RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated

Jayathirth D V jdv at openjdk.java.net
Thu Feb 17 10:48:12 UTC 2022


On Fri, 11 Feb 2022 19:20:16 GMT, DamonGuy <duke at 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 just traced function calls and i have similar doubts as Phil.
Looks like we start with parseContent() -> when we hit a tag like <script> we call parseTag() -> In parseTag() we just throw an error log saying we dont support script tag but finish this funciton -> return from parsetTag() and Hit (recent == dtd.script) use case in parseContent(). Here we actually calls functions like parseScript() and also we have handleComment() logic.

What is the relationship between parseScript() and handleComment()?
What will happen in scenarios where "strict" flag is true and we dont throw error log for <script> tag?

Also its better if you attach test case using which you are verifying this behaviour in JBS for broader consensus.

Also if we want to capture this behaviour in doc we need to specify what is happening for strict vs !strict approach.

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

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



More information about the client-libs-dev mailing list