Closed Bug 24346 Opened 25 years ago Closed 25 years ago

src attribute of img can't have leading whitespace

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: S.D.deHoog, Assigned: rickg)

Details

I get the alt contents when trying to view any of these images.
Example: <IMG SRC="   test.gif" alt="booboo">
This should be allowed however (according to rfc-2396, which is referenced in
the html 4.01 specs).
Assignee: pnunn → rickg
I'm guessing this is a job for htmlparser people...
Rickg, do you know who handles parser/token issues?
-p
Status: NEW → ASSIGNED
No -- the "parser-people" are agnostic when it comes to how well formed strings
like this are. However, I'll make a change for you in the html document to
correct for this problem. In the future, it'd be great if you could get familiar
with this code.
Assignee: rickg → harishd
Status: ASSIGNED → NEW
Stealing the bug.
Target Milestone: M14
Assignee: harishd → rickg
Stealing this one back.
Component: ImageLib → Parser
After some further tests, it seems that all URL parameters are affected,
including the HREF param. in anchors (ex.: <A HREF="    thisfails.txt">link</A>)
So this would indeed seem to be a parser bug, rather than ImageLib.
ACK! The parser should not be changing your input in this way; it needs to 
accurately reflect the input stream. The content sink can, and the fix will be 
done there.
Status: NEW → ASSIGNED
Fixed in my tree awaiting chance to land.
Fixed by change to contentsink where we strip leading whitespace.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified. thx
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.