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
{{ message }}
Repository navigation
Improper Html closing tag results in addition of text nodes #2230
Jsoup is not able determine improperly closed html tags.
For example, <a> hello </a< would result in <a> hello </a>< <div> hello </div<> would result in <div> hello </div><>
Browsers will properly close the tags and does not add a < or > text nodes like Jsoup
OK, I've aligned it to the current spec. That allows tag names like a<b (and you can see that in Chrome with HTML like <div> hello </div<> <a>One<a<b>Hello</b>). That's pretty gross IMO, but better for us to be consistent.
Thanks @jochenberger -- yes that is what we would expect now. The previous #797 behavior was probably a better experience for this case, but ultimately lead to too much difference betwen browsers/spec and jsoup.
The th< tag is getting promoted ahead of the table tag in your instance due to the table parsing rules that move non-table elements out of the table.
Activity
jhy commentedon Nov 23, 2024
See #797 - at that point we moved out of spec. But the spec used to add the
<character as an attribute name, not to the tag name. https://html.spec.whatwg.org/multipage/parsing.html#tag-name-stateWill review moving closer to spec and impact.
jhy commentedon Nov 23, 2024
OK, I've aligned it to the current spec. That allows tag names like
a<b(and you can see that in Chrome with HTML like<div> hello </div<> <a>One<a<b>Hello</b>). That's pretty gross IMO, but better for us to be consistent.Allow `<` in tag name state
jochenberger commentedon Nov 29, 2024
This change just pointed me to some invalid HTML that I was generating, so thanks! 🙂
I was generating (more or less) the following:
1.18.1 turned that into
Now, with 1.18.2, it get
I assume that it's related to this change. I just wanted to make sure that the new behavior is expected.
jhy commentedon Dec 3, 2024
Thanks @jochenberger -- yes that is what we would expect now. The previous #797 behavior was probably a better experience for this case, but ultimately lead to too much difference betwen browsers/spec and jsoup.
The
th<tag is getting promoted ahead of thetabletag in your instance due to thetableparsing rules that move non-table elements out of the table.chore(deps): update all non-major dependencies (mulk/mulkcms2!58)