You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a problem using refractor 4.8.0 where when a Markdown code block is specified to be html, any tags inside that block get stripped out completely.
A minimal example that reproduces the issue is this snippet of Markdown:
It also only does this if you put the html language on the code block. Without it, the tags aren't stripped out.
Am I using the library wrong? It seems that if I replace the < and > with < and >, that fixes the issue, but if I do that on a full Markdown file, any inlined HTML tags will not be highlighted. It also doesn't seem like that sort of escaping is needed for other file types (e.g. JavaScript).
It looks like this is being caused because of textContent in markdown.js, but I don't know that changing that is the right solution here (or I'd open a PR 😀).
Let me know if you need any more information, or if I can help. Thanks!
The text was updated successfully, but these errors were encountered:
I've run into a problem using refractor 4.8.0 where when a Markdown code block is specified to be
html
, any tags inside that block get stripped out completely.A minimal example that reproduces the issue is this snippet of Markdown:
I set up a Replit example that shows the result of rendering this looks like:
As you can see, the H1 tags are completely gone.
It also only does this if you put the
html
language on the code block. Without it, the tags aren't stripped out.Am I using the library wrong? It seems that if I replace the
<
and>
with<
and>
, that fixes the issue, but if I do that on a full Markdown file, any inlined HTML tags will not be highlighted. It also doesn't seem like that sort of escaping is needed for other file types (e.g. JavaScript).It looks like this is being caused because of
textContent
inmarkdown.js
, but I don't know that changing that is the right solution here (or I'd open a PR 😀).Let me know if you need any more information, or if I can help. Thanks!
The text was updated successfully, but these errors were encountered: