W3C home > Mailing lists > Public > public-html@w3.org > January 2009

Re: Named character references

From: Thomas Broyer <t.broyer@ltgt.net>
Date: Fri, 9 Jan 2009 10:13:04 +0100
Message-ID: <a9699fd20901090113x35d0deam613d1dfcad9e9899@mail.gmail.com>
To: public-html <public-html@w3.org>
On Fri, Jan 9, 2009 at 9:49 AM, Maurice wrote:
>
> This reminds me of a question I have.
>
> Why do some browsers interpret both  &sect; and &sec (no semicolon) as § ?
>
> I had a horrible issue recently where I needed to use the url
> content.php?cmd=update&sect=homepage&id=33
> But my server was being sent from the browser (firefox) the string
> ?cmd=update§=homepage&id=33
> which of course meant that my application failed miserably.
>
> Are browsers supposed to interpret named entities even when they don't end
> with semicolon?

Yes.
SGML defines this kind of parsing in some specific cases (and most
HTML versions are SGML-based), and browsers have implemented different
rules (they've never been SGML-based) that are used for HTML5 (not
SGML-based).

However, your code is wrong, whichever the HTML version: you should
use &amp; in your URI.
See http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2

-- 
Thomas Broyer
Received on Friday, 9 January 2009 09:13:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:28 GMT