[Python-ideas] Add "htmlcharrefreplace" error handler

Steven D'Aprano steve at pearwood.info
Tue Jun 11 17:52:54 CEST 2013


On 12/06/13 01:38, M.-A. Lemburg wrote:
> On 11.06.2013 17:29, Serhiy Storchaka wrote:
>> 11.06.13 17:49, Serhiy Storchaka написав(ла):
>>> I propose to add "htmlcharrefreplace" error handler which is similar to
>>> "xmlcharrefreplace" error handler but use html entity names if possible.
>>
>> Or it should be named "htmlentityreplace"?
>
> Yes, since that's the more accurate and intuitive name.

Intuitive, perhaps, but I'm not sure about accurate. According to Wikipedia:

[quote]
Although in popular usage character references are often called "entity references" or even "entities", this usage is wrong.[citation needed] A character reference is a reference to a character, not to an entity. Entity reference refers to the content of a named entity. An entity declaration is created by using the <!ENTITY name "value"> syntax in a document type definition (DTD) or XML schema.
[end quote]


https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references


-- 
Steven


More information about the Python-ideas mailing list