No apos in htmlentitydefs

Fredrik Lundh fredrik at pythonware.com
Mon Nov 28 11:42:10 EST 2005


Kent Johnson wrote:

> I see that htmlentitydefs.name2codepoint does not include 'apos'
> as one of the recognized names. Is this intentional or a bug?
>
> In fact ' is not a recognized entity in HTML 4.01; see this list:
> http://www.w3.org/TR/html4/sgml/entities.html#misc
>
> But it is recognized in XHTML 1.0:
> http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters
>
> and AFAIK it is commonly supported by browsers which IMO argues
> that it should be included.

it's a predefined XML entity.  a classic HTML parser won't understand
it, and the W3C HTML validator chokes on it, so it should definitely not
appear in a list of *HTML* entities.

</F>






More information about the Python-list mailing list