Closed Bug 154120 Opened 22 years ago Closed 20 years ago

whitespace around equals sign shown inside attribute's quote marks

Categories

(Core Graveyard :: View Source, defect)

x86
Windows 98
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha2

People

(Reporter: zilla, Assigned: mrbkap)

References

()

Details

Attachments

(1 file, 1 obsolete file)

If a page contains markup like
<TAG attr = "value">
then Mozilla's viewsource will display this as
<TAG attr =" value">
so that the space char is inside the quote marks.
See the URL above for an example, all attributes in that file have a space
either side of the equals sign, and none inside the quotes, but Mozilla's
ViewSource shows them wrong. This happens with double or single quotes.
Confirmed in build 2002062308 PC/Win98.

Problem does not occur in IE6, Netscape 4.79, and Opera 6.03.
Severity: normal → trivial
Status: UNCONFIRMED → NEW
Ever confirmed: true
Still present in 1.1b installed from talkback-full-installer.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1b) Gecko/20020721
(This might be a separate bug, but I'm guessing it's related)....

Additionally, the following (invalid) source, with an attribute value that
contains a quote:
<tag attr="val with " quote">
is shown by Mozilla's View Source command as:
<tag attr="val " val>
(the second quote disappears)

This automatic correction might make the markup valid (sort of) and therefore
allow the HTML page to be rendered correctly by Mozilla, but why is the
correction seen when using the View Source function?
View Source should show the source EXACTLY as received from the server, warts
and all. No other browser I know of edits the source before displaying it.

See the URL above, and click the "other page" link for an example of this behaviour

N.B. If single quotes are used, not double, then the third quote is shown (so
maybe this is a separate bug - the main bug behaves the same for single and
double quotes - i'll file it separately if someone can clarify)

Jon, see bug 57724. Probably bug 107611 should be duped to this one,
since that one is badly reported, and this one is clear.
Depends on: 57724
or possibly a variant of bug 43267
*** Bug 107611 has been marked as a duplicate of this bug. ***
*** Bug 183811 has been marked as a duplicate of this bug. ***
*** Bug 194462 has been marked as a duplicate of this bug. ***
Isn't this a duplicate of bug 149867? Or is that a duplicate of this bug?
> Isn't this a duplicate of bug 149867?

Yes, I think so, although that bug doesn't make it clear that the problem is
only with view-source - it implies an applet was affected by the munging as well.
*** Bug 210078 has been marked as a duplicate of this bug. ***
Attached patch an attempted fix (obsolete) — Splinter Review
Sorry for the spontaneity of this, but I wasn't sure of what else to do. As far
as I know, this fixes this bug by ensuring that the " is appended after the
white space, and not always at the beginning of the value string.
*** Bug 174905 has been marked as a duplicate of this bug. ***
This bug confirmed existence in the following release and builds;

Release
- Mozilla Firefox 0.8

Nightly Build
- Mozilla Firefox/0.8.0+ 
 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040228
- Mozilla browser
 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:) Gecko/20040301

Neither when using with Windows XP (Professional SP1)
*** Bug 149867 has been marked as a duplicate of this bug. ***
Blake, in general when you attach a patch you need to request review from the
module owner (see http://mozilla.org/owners.html though it's a little out of
date for the parser) or someone who's reviewed changes to the file recently...
otherwise the patch might not get noticed.  :(

Over to Blake, since it's his patch.
Assignee: doronr → mrbkap
Comment on attachment 149664 [details] [diff] [review]
Blake's fix, applied to current trunk

r+sr=bzbarsky.	This is exactly right.
Attachment #149664 - Flags: superreview+
Attachment #149664 - Flags: review+
Checked in for 1.8a2.  Taking the liberty of setting the target milestone
accordingly....
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8alpha2
*** Bug 246247 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
*** Bug 276253 has been marked as a duplicate of this bug. ***
*** Bug 284407 has been marked as a duplicate of this bug. ***
*** Bug 286165 has been marked as a duplicate of this bug. ***
*** Bug 286109 has been marked as a duplicate of this bug. ***
*** Bug 292882 has been marked as a duplicate of this bug. ***
*** Bug 293050 has been marked as a duplicate of this bug. ***
*** Bug 304977 has been marked as a duplicate of this bug. ***
Product: SeaMonkey → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: