Problem with the new feature "Automatic header anchor links"

After recent update, discourse add a new feature which add anchor links to header. It is nice feature :+1: however I found some problem related to this new feature.

  1. The new feature “Automatic header anchor links” seem don’t work with non-English Characters.
    For a non-English header, the anchor is empty, like this:
    <a name class="anchor"></a>

  1. The “Read more” link with span class “topic-excerpt-more” in excerpt seem don’t work anymore. If you click on it, nothing happen.

By inspecting the “excerpt” in latest.json file ,
The <a> tag with class “anchor” and “lightbox” are also included in excerpt, which weren’t there before.

Example:
"excerpt": "<a class=\"lightbox\" href=\"https://example.com/uploads/default/original/1X/0f20b75f1740924f7388fa3774c6630f1caa184c.jpeg\" data-download-href=\"https://example.com/uploads/default/0f20b75f1740924f7388fa3774c6630f1caa184c\" title=\"Title\"></a>\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n\n<a name=\"\" class=\"anchor\"></a>【見出し】\n\n<a name=\"\" class=\"anchor\"></a>【&hellip;",

2 Likes

I cannot reproduce point #2 on your list. Do you see any errors in your browser’s console?

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.