Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

References containing angle brackets improperly escape the angle bracket with a backslash \ before escaping them with the HTML escape character > #495

Closed
loucadufault opened this issue Nov 6, 2023 · 2 comments

Comments

@loucadufault
Copy link

This came up when using this plugin alongside the plugin: https://github.com/Gerrit0/typedoc-plugin-missing-exports, which by default creates a module named <internal>. This module seems to be improperly escaped when referenced elsewhere in the typedoc, as:

### Modules

- [&lt;internal\&gt;](index._internal_.md)

which renders as:

Note that the escaping is somehow only incorrect for the closing angle bracket.

I am not sure whether this is an issue with this plugin, but I confirmed that when not using the plugin, the reference to the module is properly escaped (using the native HTML renderer).

I tried looking through the source, as far as I can tell there is the escapeChars() function that probably runs on the module name to create the reference name, but I am not sure what is then converting that to the HTML escape characters &lt; and &gt;.

@tgreyuk
Copy link
Member

tgreyuk commented Nov 6, 2023

OK thanks - this was actually being escaped by Handlebars. Please try with typedoc-plugin-markdown@3.17.1 which contains a fix.

@loucadufault
Copy link
Author

Thanks for the quick fix! Can confirm this is resolved in 3.17.0.

@tgreyuk tgreyuk closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants