-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.3.0
-
generic
-
generic
Name: yyT116575 Date: 03/09/2001
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
javax.swing.text.html.parser.Parser has a private method parseEntityReference(),
which convertes HTML enitities to charaters. For example > is converted to >.
However, this method is also called from Parser.parseAttributeValue(), so the
conversion is done even when these strings appears as part of quoted attributes.
This behavior is causing us trouble when the attribute is a URL.
For example, assume the following is in the HTML file:
<a href="info.html?page=3§=2">Info on Java Programming Language</a>
The parser returns "greg.html?page=3?=2" for the value of the "href" attribute.
That is, it has incorrectly interpreted the § parameter to the URL as an
HTML string for the section character, and therefore mangled the URL into a
meaningless string. I believe that these entity reference conversions should
never be done when parsing parsing paramter values. The fix for this would be
simple: remove the parseEntityReference() call from parseAttributeValue() in Parser.
(Review ID: 118513)
======================================================================