Grinnz/perldoc-browser

Table of contents links no longer work

happy5214 opened this issue · 6 comments

The a HTML elements in the code blocks are being removed by at least Firefox 108.0, apparently for security reasons (the browser console complains about them being unescaped). This causes all of the links in the main table of contents to be stripped and turned into plain code text, rendering the ToC mostly useless.

The same happens w/ a chrome browser on my mobile phone: no links. Chrome 109.0 Android 13 Pixel 7

I can confirm this with Firefox 109,

Links are rendered when javascript.enabled is off in the about:config

So can be seen as highlight.js-issue? (https://github.com/highlightjs/highlight.js/wiki/security)
perldoc-highlightjs

haarg commented

This is caused by a combination of updating highlight.js and 4c47d7c. I'm not really clear what the purpose of using plaintext rather than nohighlight is.

That's annoying. Regardless it's only an issue for these customized code blocks on that page. Would be more of an issue if we wanted to insert links into code snippets like the old perldoc site did.

Thanks for the example, I didn't know what was meant by "table of contents" since that refers to the list at the top of the page.

I need to re-render each perl with this change but it should be fixed by tomorrow. Thanks for the report!