Hi All,

It needs to be noted that html <a name> tag is obsolete in html5  as per https://www.w3.org/TR/2011/WD-html-markup-20110405/a.html#a.attrs.name and so we should use "id" attribute instead in JEditorPane.scrollToReference to conform to html5 specification. As per https://www.w3schools.com/tags/att_global_id.asp, In HTML5, the id attribute can be used on *any* HTML element .

So, the proposed fix is to also check for "id" attribute to scroll to reference and not just rely on "name" attribute.

Bug: https://bugs.openjdk.java.net/browse/JDK-8199900
webrev: http://cr.openjdk.java.net/~psadhukhan/8199900/webrev.00/

Not sure of how to approach for a testcase for this html5 addition. However, existing JEditorPane jtreg tests passed.

Regards
Prasanta

Reply via email to