On Fri, 17 Jun 2022 15:29:47 GMT, Alexey Ivanov <[email protected]> wrote:
>> Damon Nguyen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed list format. Removed p. > > src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line > 1310: > >> 1308: * <li>When the container using HTML tags is editable: >> 1309: * <ul> >> 1310: * <li>Tags display the tag text as editable text >> fields.</li> > > Suggestion: > > * <li>The tags will be displayed as editable text fields with > the tag name.</li> Incorporated both of the suggested changes for clarification. > src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line > 1312: > >> 1310: * <li>Tags display the tag text as editable text >> fields.</li> >> 1311: * <li>The content within the tags will be handled by the >> editor as >> 1312: * regular text.</li> > > This is not how `<script>` is handled though: the content is displayed in a > text field. The text in the unknown tag is displayed directly. > > The content of `<script>` tag is handled as if it's a comment. > <a > href="https://urldefense.com/v3/__https://github.com/openjdk/jdk/blob/ae2504b4692a5298b5835727b04a44e1edc8a4d6/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java*L2176-L2177__;Iw!!ACWV5N9M2RV99hQ!PnVrjBcKvJKsl9fX2K3YCtM24LMYsgrkK8FME1loi_CnL-s9xVe-pJaoBehKau9VcSJb84q6JAKerMNBFZOPyeckCA$">https://github.com/openjdk/jdk/blob/ae2504b4692a5298b5835727b04a44e1edc8a4d6/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java#L2176-L2177</a> I tried to cover this in earlier commits where I differentiate known but unsupported tags, such as script tags, and completely unknown tags. In conversation and testing, HTMLEditorKit.HTMLFactory has a create method that creates HiddenTagViews for unknown tags and for a small list of tags (title, script, param, etc.). In the end, these are all treated the same, so I grouped script tags in this javadoc change. Script tags do have a special case in the Parser where it is handled as a comment but being handled as a comment doesn't change the behavior and still displays the content. ------------- PR: https://git.openjdk.org/jdk/pull/7446
