Closed
Bug 79492
Opened 23 years ago
Closed 23 years ago
HTML <title> handles non-entity ampersands differently than body
Categories
(Core :: DOM: HTML Parser, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: Ventifus, Assigned: harishd)
References
()
Details
(Keywords: testcase, Whiteboard: [fix in hand])
Attachments
(3 files)
1.15 KB,
patch
|
Details | Diff | Splinter Review | |
1.13 KB,
patch
|
Details | Diff | Splinter Review | |
1.05 KB,
patch
|
Details | Diff | Splinter Review |
Ampersands immediatly followed by text are ignored up to the next occuring space. This results in strings like 'PG&E' to render as 'PG'. This is also true of things which look like entities, but aren't, such as &bogusent;. This is different than the behavior on the page, which renders the text exactly as written if it can't identify that text as an entity. Will attach testcase. Mozilla 0.9
Reporter | ||
Comment 1•23 years ago
|
||
Bizarre. Bugzilla keeps saying it can't find my file, or it is empty. In any event, here's the testcase: <html><head> <title>PG&E &E: &e. &e; &&e &&e;</title> <!-- will render as 'PG . & & --> </head><body> <p>Title should look like this:</p> <p>PG&E &E: &e. &e; &&e &&e;</p> <!-- will render as 'PG&E &E: &e. &e; &&e &&e;' --> </body>
Comment 2•23 years ago
|
||
--> parser
Assignee: karnaze → harishd
Component: Layout → Parser
QA Contact: petersen → bsharma
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.2
Keywords: testcase
Here is another case: <html> <body> <textarea>PG&E</textarea> </body> </html> This ought to be fixed.
Comment 7•23 years ago
|
||
Required changes: 1) The line: + theNode->mSkippedContent->AppendWithConversion('&'); should be replaced with: + theNode->mSkippedContent->Append(PRUnichar('&')); 2) What about the trailing semicolon (if one exists)? After these changes are made, r/sr=vidur.
The trailing semicolon is a part of the string value stored in EntityToken. So, there is no need explicitly include one.
Comment 10•23 years ago
|
||
*** Bug 84712 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
Are you sure you're not trying to expand entities twice by mistake? This is why I filed bug 84712: the URL data:text/html,<title>&amp;amp;</title> displays & instead of &amp;.
r=heikki
Comment 13•23 years ago
|
||
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
Assignee | ||
Comment 14•23 years ago
|
||
Fix is in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•23 years ago
|
||
Verified on build: 2001-06-20-04-Trunk platform: Win NT The title displays fine.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•