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

.html() fails if argument contains a comment with embedded start tag #4124

Closed
bosma4u opened this Issue Jul 11, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@bosma4u
Copy link

commented Jul 11, 2018

Description

Calling html() with an argument containing a html comment fails if the comment has a start tag embedded somewhere.
I don't care about the comment itself, but the non comment part of the argument should be processed.
This bug occurs at least in FireFox, Edge and Chrome (I suspect other browsers as well), in 3.x versions of jquery, not before.
A work-around is to embed the argument in a div.

Link to test case

https://jsfiddle.net/bosma4u/xpvt214o/397622/

@gibson042

This comment has been minimized.

Copy link
Member

commented Jul 11, 2018

It's generally a bad idea to supply input that is not well-formed (i.e., you are missing end tags for your <p> elements). However, in this case there really is a bug with our element detection logic. Fix coming shortly.

@gibson042 gibson042 self-assigned this Jul 11, 2018

@gibson042 gibson042 added this to the 3.4.0 milestone Jul 11, 2018

gibson042 added a commit that referenced this issue Jul 13, 2018

@GulajavaMinistudio GulajavaMinistudio referenced this issue Jul 14, 2018

Merged

Update upstream #56

0 of 4 tasks complete

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.