Closed
Bug 287907
Opened 20 years ago
Closed 20 years ago
Whitespace interpreted as <br>
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: alutian, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 Whitespace in HTML should be ignored. Firefox interprets linefeeds in the source code as HTML (space). This was a bug introduced with IE6? The problem was introduced with images in tables. <img blahblahblah></td> is interpreted differently to <img blahblahblah>(linefeed)</td> Firefox is incorrect. ALL whitespace within a HTML file should be ignored, with the sole exception that whitespace WITHIN TEXT should be collapsed to a single space character. Whitespace between HTML tags should be ignored totally. The formatting between tags is solely for ease of reading of the source file. Reproducible: Always Steps to Reproduce: The following HTML is simple... <b> W </b> ord <br> <b>W</b>ord Actual Results: 'W' (in bold) (space) 'ord' 'W' (in bold) 'ord' Expected Results: Both lines should be the same - the 'W' in 'Word' should be in bold, and not followed by a space character, whatever the formatting of the HTML. I flag this as 'Trivial', as the results are cosmetic. But, this is a fundamental problem. Firefox should render the HTML code, and ignore the formatting between the tags.
Comment 1•20 years ago
|
||
DUPE. But triaging this at 3am is a headache, so I'll leave it to someone else to decide what to do with this. The bug is valid for HTML: http://www.w3.org/TR/html4/appendix/notes.html#notes-line-breaks This bug is hazily valid for XHTML 1.0, which places a burden of defining white space handling onto CSS2: http://www.w3.org/TR/xhtml1/#uaconf Further XHTML languages don't even want to deal with this leaving it all to CSS: http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/introduction.html#s_intro_formatting However CSS2 does a pretty poor job at this: http://www.w3.org/TR/REC-CSS2/text.html#white-space-prop But this is fixed in the upcoming CSS 2.1 standard: http://www.w3.org/TR/CSS21/text.html#q8 And made even more complex in CSS3: http://www.w3.org/TR/css3-text/#white-space-processing The original ancient bug for this is bug 2750. Though it deals with HTML Parser, while nowdays it's more about CSS with XHTML coming into play. Some other bugs that already touched on this: UNCONFIRMED bug 36717 - testcase bug 245926 - testcase NEW bug 132561 - testcase and patch bug 157698 - testcase bug 197716 - testcase bug 209073 - and bugs mentioned in it There are probably much more of them. Can someone deal with this mess?
Severity: trivial → normal
OS: Windows XP → All
Comment 2•20 years ago
|
||
*** This bug has been marked as a duplicate of 2750 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•