Closed Bug 301721 Opened 19 years ago Closed 15 years ago

attribute normalization should not happen

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: annevk, Unassigned)

Details

(Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 file)

This will make us consistent with Opera and IE and will make Mozilla more
conformant to the Web Forms 2 specification:
 <http://whatwg.org/specs/web-forms/current-work/#changes>

# The attributes defined in this specification as accepting a fixed set
# of values (e.g. type) must be compared to those values using a
# case-insensitive literal comparison. Whitespace must not be trimmed
# from attribute values to make that comparison.

# Whitespace must also not be trimmed from any other attributes (e.g.
# the value attribute).
Attached file testcase
This sounds like a good idea as long as we check that this is something that at least IE does. Otherwise i'm sure there are plenty of people out there that depend on current behaviour.
The reason I filed this bug (and got Web Forms 2 changed) is because Internet Explorer does this (and Opera too). So yeah, it would probably reduce some complexity in parsing and should not do any harm.
What about the cases covered by bug 87894 (and the bugs linked to in that bug's first comment)? It seems that web pages do rely on our stripping leading and trailing whitespace off of at least img tags.
Assignee: parser → mrbkap
QA Contact: mrbkap → parser
So it probably differs per attribute per element. Bah.
Assignee: mrbkap → nobody
(In reply to comment #4)
> What about the cases covered by bug 87894 (and the bugs linked to in that bug's
> first comment)? It seems that web pages do rely on our stripping leading and
> trailing whitespace off of at least img tags.

URL trimming doesn't belong in the HTML parser. Complying with HTML5 now.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: