-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
quotations marks inside HTML attributes aren't escaped properly when merging #1462
Comments
the snippet you have here has the part you're saying got unescaped by hl.js already unescaped. You can see it in github's own highlight. |
@MadaraUchiha If this is still an issue could you make a https://jsfiddle.net showing the exactly issue that way we can make sure we're all talking on the same page? |
Ping. |
@yyyc514 Apologies, here is the reproduction case: https://jsfiddle.net/Ltrb1e8q/ See how in the HTML source, the Note that I did not try to reproduce this with the newer versions of Highlight.js, I used the version I reported originally. |
That's not helpful. I believe you that it was an issue THEN. :-) We need to know if it's still an active issue or not. You can fork my jsfiddle if it helps: Thanks. |
Reproduction: Pretty sure issue is:
Replace only does the replace a single time, when we need to replace ALL the quotes with |
No idea about data-trim data-noescape though, those are Reveal features perhaps? But this is an actual bug so we can fix the actual bug in core and hopefully that'll help you out. |
I am using Highlight.js 9.0.0 which comes by default with reveal.js. Browser is chrome latest stable.
Given the following
I see "
Type '
" in the title, looking at the DOM through the devtools it looks like highlight.js unescapes the attribute and possible inserts unescaped entities as innerHTML, the resulting DOM looks like this:Which causes the data-title attribute to end prematurely.
The text was updated successfully, but these errors were encountered: