-
Notifications
You must be signed in to change notification settings - Fork 20.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
JQuery html adding multiple copies of dom elements when using self closing tags #4681
Comments
Thanks for reporting an issue. This change is expected, though as it was needed to fix a security issue. Please read jQuery 3.5.0 release blog post & the 3.5 upgrade guide, they should have all necessary details. |
This specific duplicating tag behavior is surprising but it's a result of two things:
This shows one of the reasons why |
I've raised this as a bug on stack overflow, so there's more detail there
https://stackoverflow.com/questions/61366853/jquery-3-5-0-producing-odd-output-using-html
but in summary, when there's a self closing tag, jQuery 3.4.1 would pretty much just deal with it, now it results in DOM elements being duplicated a few times
I think the jsbin example is fairly self explanatory
https://jsbin.com/baretotepo/edit?html,js,output
The text was updated successfully, but these errors were encountered: