JDK-4241788 : HyperLink tags in HTMLEditorKit off by one
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.
All hypertext strings (blue underline) are shown with a leading empty "_". There 's only one xref in the attached file (See Using Connection Wizard) but the problem is clearly seen.
BugTraq+ Release Management Values
COMMIT TO FIX:
It would appear we do not strip whitespace in this case <a href=...> <em>blah.
The parser will have to be investigated.
The semantics of the html parser (javax.swing.text.html.parser.Parser)
have slightly changed to better match that of the browser (NS and
IE). While no API was changed, those using the parser may notice a
slight difference in the reporting of whitespace.
Here is how things have changed:
If strict (an instance variable of
javax.swing.text.html.parser.Parser) == false (the default) an
instance variable is used to try and mimic the behavior of IE
The problematic scenarios are:
'<b>blah <i> <strike> foo'
which can be treated as:
as well as:
'<p><a href="xx"> <em>Using</em></a></p>'
which appears to be treated as:
When a tag that breaks flow, or trailing whitespace is encountered
an instance variable is set to true. From then on, all whitespace will
be ignored. The instance variable will be set back to false the first
time a non whitespace character is encountered.