Quote:
Originally Posted by ApK
I don't think that is strictly correct. The actual standard that your link references specifically and emphatically (it's capitalized) says it MAY be treated that way, not that it must or should.
http://www.ietf.org/rfc/rfc2616.txt[...]
|
The reason why RFC2616 (HTTP) can choose to do what it wants with the whitespace is exactly because "linear whitespace" is defined to have no significance beyond separation of "words" (whatever the words may mean in a given context). For interpretation purposes the processor (eg: browser) is supposed to read the contents of the text as a series of words and pay no attention to how much linear whitespace exists between each one. (Unless the text is enclosed in <pre>...</pre>, as are my code examples are below - if you check the raw HTML of this page.)
Code:
<p>This and that.</p>
should be interpreted as identical to:
Code:
<p>This
and
that.<p>
I may not like some of the rules in HTML and XML, but this one has been clear for as long as I know about.
On my computer (Windows 7), Opera 12, Firefox 17, and Internet Explorer 9 all get it right.