Upgrade guide: Add more details to the jQuery 3.5 upgrade guide#202
Upgrade guide: Add more details to the jQuery 3.5 upgrade guide#202mgol merged 2 commits intojquery:masterfrom
Conversation
The commit adds information about jQuery Migrate 3.3.0+ logging of non-compliant HTML input. It also explicitly states the common example of using a single auto-closing tag works even in jQuery 3.5.0+. There are also tweaks in other places.
b13ac01 to
dc7c5bc
Compare
dmethvin
left a comment
There was a problem hiding this comment.
Not sure if I made it better or not, but wanted to propose another way to express the whole HTML5 parsing thing. I'm good either way.
pages/upgrade-guide/3.5.md
Outdated
| because `<div/>` was replaced with `<div></div>` & `<span/>` with `<span></span>`. | ||
|
|
||
| jQuery 3.5.0 has changed `jQuery.htmlPrefilter` to be an identity function. That means that the above `jQuery` call would now create above HTML structure only in XML mode of HTML (called also as XHTML) but in regular HTML mode you would now get: | ||
| jQuery 3.5.0 has changed `jQuery.htmlPrefilter` to be an identity function. In HTML mode auto-closing tags are being replaced with their opening tags, making `<div/><span/>` interpreted as `<div><span>`; the browser will automatically close these tags at the end of input. That means that the above `jQuery` call would now create above HTML structure only in XML mode of HTML (called also as XHTML) but in regular HTML mode you would now get: |
There was a problem hiding this comment.
I'm wondering if people understand what "HTML mode" is nowadays. XHTML is pretty archaic!
I think the important point here is that the new interpretation of this string is being done by the browser's HTML5 parser and not jQuery.
There was a problem hiding this comment.
Yeah, I just didn't want to imply that <div/><span/> will always be converted to the nested structure by the browser as in XML mode it won't happen. Maybe I'll cut the XML part out. Your changes look mostly good so I'll reuse them, thanks. :)
Co-Authored-By: Dave Methvin <dave.methvin@gmail.com>
|
@dmethvin Can you have another look? I added another commit with your suggestions & some of my own. |
The commit adds information about jQuery Migrate 3.3.0+ logging of non-compliant
HTML input. It also explicitly states the common example of using a single
auto-closing tag works even in jQuery 3.5.0+.
There are also tweaks in other places.