Last Comment Bug 172947 - View Source contains missing quotes and extra > marks
: View Source contains missing quotes and extra > marks
Status: RESOLVED DUPLICATE of bug 70918
:
Product: Core
Classification: Components
Component: HTML: Parser (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: ---
Assigned To: harishd
: Moied
Mentors:
http://www.monkeydyne.com/rmcs/badsyn...
: 231003 (view as bug list)
Depends on: 57724 188609
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-06 13:42 PDT by Soren Ragsdale
Modified: 2004-09-15 16:31 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Soren Ragsdale 2002-10-06 13:42:18 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

My HTML code contains:

================================================
<form action="foo.cgi">
<input type="hidden" name="tagline" value="begin \"double\" \'single\' <inside> 
\\slash\\ end">
<input type="submit" value="Save">
</form>
================================================

...but the "view source" display shows:

++++++++++++++++++++++++++++++++++++++++++++++++
<input type="submit" value="Save">
</form><form action="foo.cgi">
<input type="hidden" name="tagline" value="begin \"double\ \'single\' ><inside>
\\slash\\ end">
<input type="submit" value="Save">
</form>
+++++++++++++++++++++++++++++++++++++++++++++++

Note that double-quotes have been removed and an extra > has been added

Disclaimer: I'm not completely sure that the above is valid HTML code.  I think
this is the way to escape single quotes, double quotes, backslashes, and
brackets but it's possible that this isn't valid and the bug is on *my* end.

Reproducible: Always

Steps to Reproduce:




I have only tested this in Linux.
Comment 1 Soren Ragsdale 2002-10-06 13:43:21 PDT
Possible duplication of bug 43267, except that this bug also addresses an extra
> insertion.  Maybe that means this is 2 bugs.
Comment 2 Peter Mularien 2002-11-21 10:32:27 PST
Please mark NOT A BUG.

This is not valid HTML. From the HTML 4.01 Transitional spec, section 3.2.2:
ref:
http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-3.2.2

"By default, SGML requires that all attribute values be delimited using either
double quotation marks (ASCII decimal 34) or single quotation marks (ASCII
decimal 39). Single quote marks can be included within the attribute value when
the value is delimited by double quote marks, and vice versa. Authors may also
use numeric character references to represent double quotes (&#34;) and single
quotes (&#39;). For double quotes authors can also use the character entity
reference &quot;."

Thus, it is valid that the attribute is indicated to end at the second double
quote. 

If the source is modified:
  value="begin \&quot;double\&quot; 

... then the View Source and page both display correctly.
Comment 3 Peter Mularien 2002-11-21 10:47:19 PST
Sorry... it is a bug that the View Source is not displaying the true source.
It's not a bug that the page renders incorrectly (but maybe that's not what the
author was getting at in the first place... :)
Comment 4 Jonathan Stewart 2003-01-10 15:13:02 PST
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030110
(Gentoo build)

As reporter mentioned, the source does not appear as it actually is.  I verfied
this by saving the HTML file, and opening it in Vim 6.1.  The actual source is
how the reporter cliamed, the source shown in Mozilla's "View Source" is not the
true source
Comment 5 Boris Zbarsky [:bz] 2004-01-17 21:10:40 PST
*** Bug 231003 has been marked as a duplicate of this bug. ***
Comment 6 Blake Kaplan (:mrbkap) 2004-09-15 16:31:48 PDT
This is actually a dupe of 2 bugs. Marking a dupe because those are more
well-defined. See: bug 70918 and bug 43267

*** This bug has been marked as a duplicate of 70918 ***

Note You need to log in before you can comment on or make changes to this bug.