Closed
Bug 312104
Opened 19 years ago
Closed 19 years ago
Some HTML entities are not parsed inside textarea when the semicolon is omitted
Categories
(Core :: DOM: HTML Parser, defect, P4)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: uriber, Assigned: mrbkap)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
889 bytes,
text/html
|
Details | |
7.93 KB,
patch
|
bzbarsky
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Usually (at least in quirks mode), the HTML parser recognizes HTML named
entitities even when the final semicolon is omitted (e.g., """).
However, inside a textarea, this is no longer true for some entities. While it
still works for basic XML and "Latin-1" entities, other entities are not
recognized and are displayed literally.
This regressed sometime between 2004-11-10 and 2004-12-19. I'm suspecting bug 88952.
Testcase coming up.
Reporter | ||
Comment 1•19 years ago
|
||
Assignee | ||
Comment 2•19 years ago
|
||
IE seems to have the same behavior as us on this testcase (except that in the
pre case, the 4th line is the same as in the textarea). The trivial workaround
is to use semicolons on your entities (as is suggested by the HTML spec and
totally cross-browser compatible) I'm not sure there's a bug here.
Comment 3•19 years ago
|
||
Every couple of weeks, I have to explain to someone that just because IE treats
¥2000 as the equivalent of ¥2000 doesn't mean it's correct. If we are
going to follow SGML rules except for some things in textareas, may I please
have an explanation I can add on to that lecture, about why the rules differ for
only one of HTML's three sets of character entity references, but only in textareas?
(fwliw, Opera 8.5 treats all 8 lines as character entity references, and
replaces them all, "correctly")
Assignee | ||
Comment 4•19 years ago
|
||
Sigh. I'm basically convinced. This should be a simple patch.
Priority: -- → P4
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: MacOS X → All
Hardware: Macintosh → All
Assignee | ||
Comment 5•19 years ago
|
||
This fixes the textarea case while leaving attributes with the old, compatible behavior.
Attachment #201698 -
Flags: review?(bzbarsky)
![]() |
||
Comment 6•19 years ago
|
||
Comment on attachment 201698 [details] [diff] [review]
Fix textareas
>Index: parser/htmlparser/src/nsHTMLTokens.cpp
>@@ -139,41 +141,46 @@ nsresult ConsumeEntity(nsScannerSharedSu
>+ * @param aIECompatEntities IE treats entities with values > 255 as
>+ * entities only if their terminated with a
"they are terminated"
Also, add aIECompatible to the comments on ConsumeEntity?
Attachment #201698 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #201698 -
Flags: superreview?(brendan)
Comment 7•19 years ago
|
||
Comment on attachment 201698 [details] [diff] [review]
Fix textareas
Is IE just doing what Netscape did? A minor matter, affecting only that PRBool argument ;-).
/be
Attachment #201698 -
Flags: superreview?(brendan) → superreview+
Assignee | ||
Comment 8•19 years ago
|
||
Fix checked in. According to code comments, Netscape 4.x didn't respect these entities with or without the terminating semicolon, so we truely are being compatible with IE.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•