RCDATA elements like <title> and <textarea> should match their end tags case-insensitively. A direct mixed-case closer works as expected: <title>Foo</TiTLE> closes the title. But when tag-shaped text appears before the closer, jsoup can miss the mixed-case end tag and leave RCDATA early.
For example, <title><p>Foo</TiTLE> creates a real body p element instead of keeping <p>Foo as title text. Similarly, <textarea><img src=x></TeXtArEa> creates an img element.
This was a premature optimization: the implementation only looked for consistent-case matches. I’ll fix it with a real case-insensitive scan.
RCDATA elements like
<title>and<textarea>should match their end tags case-insensitively. A direct mixed-case closer works as expected:<title>Foo</TiTLE>closes the title. But when tag-shaped text appears before the closer, jsoup can miss the mixed-case end tag and leave RCDATA early.For example,
<title><p>Foo</TiTLE>creates a realbody pelement instead of keeping<p>Fooas title text. Similarly,<textarea><img src=x></TeXtArEa>creates animgelement.This was a premature optimization: the implementation only looked for consistent-case matches. I’ll fix it with a real case-insensitive scan.