[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resources for AtomPub parser validation



On Tue, Jul 1, 2008 at 5:01 AM, Erik Wilde wrote:
>
>>>  Unless the url was something like: compare?original=1&copy=2
>>>  In which case many browsers would treat the "&copy" as a copyright
>>> symbol,
>>> and your url would be completely bolloxed.
>>
>> Wouldn't the second var have to be ";copy"?
>
> "copy;" you mean, right?
>
>> Have I been living a lie all these years by putting a semi-colon after
>> my entities like a sucker?
>
> no. but browser try to be smart.

Isn't that actually part of SGML? (I know browsers never used an SGML
parser, but if it's part of SGML, it is part of HTML)

> so if the text following a "&" is not an
> entity name they know, they assume you just meant "&" and not really an
> entity. if, however, the name is an entity they know, but there is no ";"
> following it, they assume you forgot the ";" and add it for you...

...only for some entities (as far as I know, the ones that map to
iso-8859-1 characters), and it also varies depending on the context
(attribute value vs. PCDATA).
Ian Hickson has done an incredible job at documenting the browsers
behavior in HTML5: http://www.w3.org/TR/html5

-- 
Thomas Broyer