In message <[EMAIL PROTECTED]>, Stuart
Bishop wrote:

> People also use that function to escape non-HTML too - if they are using
> it as documented, and it produces the correct results for them, great.
> Note that the documentation doesn't say that input has to be HTML, nor
> that output must be used as HTML.

It says that the input is converted to "HTML-safe sequences".

> It just describes the transformation 
> that it does clearly and unambiguously and can quite happily be used for
> generating quoted text for use in, say, XML documents.

And all those character entities references are also valid in XML.

> Also, because Python has a 
> conservative policy on backwards incompatible changes, you are protected
> from some wanker going and changing the HTML safe mappings arbitrarily,
> say using numerical entity references instead of &gt;, &lt; and &amp;.

Why would that be wrong? It would still be consistent with the
documentation.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to