Closed
Bug 122077
Opened 23 years ago
Closed 23 years ago
Angle brackets in tags within NOFRAMES content escaped on save as complete page
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: dan, Assigned: adamlock)
References
()
Details
Attachments
(2 files, 1 obsolete file)
231 bytes,
text/html
|
Details | |
749 bytes,
patch
|
harishd
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Try using the "Save Page As" on this URL (to a frameset), using "Save as
complete page" option. The NOFRAMES section includes a hyperlink, but in the
saved version the angle brackets used to delineate the A tag are escaped into
ampersand sequences, meaning that the link doesn't work as expected when the
file is used in a non-frame browser -- the literal text of the tag is shown
instead. This is an unexpected and undesired alteration of the original HTML
code. (I'm using build 2002012403 in Win98.)
Reporter | ||
Comment 1•23 years ago
|
||
My attempts to create a simple testcase for this turned up another problem with
saving framesets... see bug 122078.
![]() |
||
Comment 2•23 years ago
|
||
To adamlock. Seeing this on current linux too.
Assignee: law → adamlock
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Hardware: PC → All
Original sample URL is pretty nasty, so here is a simpler example of the
problem.
My guess is that the HTML parser is simply turning everything inside a
<NOFRAMES> element into text (since Moz never looks at it anyway). When the
document is saved the encoder spews out the text converting angle brackets to
entities as it does so.
This line in the parser suggests some other elements which will get treated the
same way.
http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokenizer.cpp#755
Original sample URL is pretty nasty, so here is a simpler example of the
problem.
My guess is that the HTML parser is simply turning everything inside a
<NOFRAMES> element into text (since Moz never looks at it anyway). When the
document is saved the encoder is spews out the text converting angle brackets
to entities as it does so.
This line in the parser suggests some other elements which will get treated the
same way.
http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokenizer.cpp#755
*** Bug 125392 has been marked as a duplicate of this bug. ***
Comment 6•23 years ago
|
||
Harish would know all about that...
>My guess is that the HTML parser is simply turning everything inside a
><NOFRAMES> element into text (since Moz never looks at it anyway). When the
>document is saved the encoder is spews out the text converting angle brackets
>to entities as it does so.
You're right when FRAMES are enabled NOFRAMES content would get collected as
text ( mainly to avoid residual style from doing nasty stuff to the NOFRAMES
content and to the rest of the content ). I don't think this is a parser
problem. May be the encoder should not do any kind of conversion to the NOFRAMES
content.
Patch tells HTML serializer to treat noframes content as CDATA so it doesn't
replace angle brackets with entities any more.
Reviews?
Attachment #69460 -
Attachment is obsolete: true
Comment 10•23 years ago
|
||
Comment on attachment 70381 [details] [diff] [review]
Simple fix
r=harishd
Attachment #70381 -
Flags: review+
Comment 11•23 years ago
|
||
Comment on attachment 70381 [details] [diff] [review]
Simple fix
sr=jst
Attachment #70381 -
Flags: superreview+
Assignee | ||
Comment 12•23 years ago
|
||
Fix is in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
vrfy'd fixed using 2002.03.13 comm bits on linux rh7.2, win2k and mac 10.1.3.
tested with http://hopey.mcom.com/tests/simple-frames-2.html
Status: RESOLVED → VERIFIED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•