whitespace around equals sign shown inside attribute's quote marks

RESOLVED FIXED in mozilla1.8alpha2

Status

Core Graveyard
View Source
--
trivial
RESOLVED FIXED
15 years ago
7 years ago

People

(Reporter: Jonathan Wakely, Assigned: mrbkap)

Tracking

Trunk
mozilla1.8alpha2
x86
Windows 98

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

15 years ago
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.

Comment 1

15 years ago
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
(Reporter)

Comment 2

15 years ago
Still present in 1.1b installed from talkback-full-installer.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1b) Gecko/20020721
(Reporter)

Comment 3

15 years ago
(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)

Comment 4

15 years ago
Jon, see bug 57724. Probably bug 107611 should be duped to this one,
since that one is badly reported, and this one is clear.

Updated

15 years ago
Depends on: 57724

Comment 5

15 years ago
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. ***
(Assignee)

Comment 9

14 years ago
Isn't this a duplicate of bug 149867? Or is that a duplicate of this bug?
(Reporter)

Comment 10

14 years ago
> 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. ***
(Assignee)

Comment 12

14 years ago
Created attachment 126688 [details] [diff] [review]
an attempted fix

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.

Comment 13

14 years ago
*** Bug 174905 has been marked as a duplicate of this bug. ***

Comment 14

13 years ago
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. ***
Created attachment 149664 [details] [diff] [review]
Blake's fix, applied to current trunk
Attachment #126688 - Attachment is obsolete: true
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
Last Resolved: 13 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. ***

Comment 22

12 years ago
*** Bug 284407 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 23

12 years ago
*** Bug 286165 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 24

12 years ago
*** Bug 286109 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 25

12 years ago
*** Bug 292882 has been marked as a duplicate of this bug. ***

Comment 26

12 years ago
*** Bug 293050 has been marked as a duplicate of this bug. ***

Comment 27

12 years ago
*** Bug 304977 has been marked as a duplicate of this bug. ***

Updated

7 years ago
Component: View Source → View Source
Product: SeaMonkey → Core Graveyard
You need to log in before you can comment on or make changes to this bug.