On Fri, 11 Feb 2022 19:20:16 GMT, DamonGuy <d...@openjdk.java.net> wrote:

> Updated Parser class doc by appending to the doc regarding lack of support 
> for HTML script tags. Adding this information to the "parse" function did not 
> seem as consistent for formatting as adding it to the Parser class doc.

I have a locally modified jdk and test that I used to test the behavior of 
script tags. My test was based off of HtmlCommentTagParseTest, but now I see 
other tests that use script tags. I'll look into making a more comprehensive 
test, but the other tests I found actually use script tags. So script tags seem 
to be supported in some way.
  
  From what I gathered from my tests, parseContents() runs parseScript() first, 
then parseTag() as both of you mentioned. I'll look into the strict approach 
for script tags. This strict vs !strict may be what the JBS issue is actually 
referring to.
  
  parseScript() seems to read the contents one char at a time, but there seems 
to be no attempt to differentiate script contents from any other type of text. 
All chars, within script tags or not, uses readCh() on each char. So it makes 
sense that the contents are handled as any other text. The parseScript method 
seems to be used to differentiate comments within script tags from non-comment 
text.
  
   handleComment() is also run on the script tag contents, and this seems to be 
used for debugging mostly by DocumentParser and HTMLEditorKit.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7446

Reply via email to