bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12227: 24.1.50; xml.el: xml-entity-alist is pre-ecaped!


From: Chong Yidong
Subject: bug#12227: 24.1.50; xml.el: xml-entity-alist is pre-ecaped!
Date: Sun, 19 Aug 2012 12:13:14 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Matt Price <matt.price@utoronto.ca> writes:

> Unfortunately the current version of xml.el has two of the entities
> pre-escaped:
>
> (defvar xml-entity-alist
> '(("lt" . "&#60;")
> ("gt" . ">")
> ("apos" . "'")
> ("quot" . "\"")
> ("amp" . "&#38;"))
> "Alist mapping XML entities to their replacement text.")
>
> this creates invalid xml output.

Please provide an example of why you think this is a bug.

> ("amp" . "&"))

This would be wrong.  XML entity substitution is recursive, so the above
would cause `AT&amp;T;' to expand to `AT&T;', and then further
substitution would fail since there is no entity `&T;' defined.

The way it is set up now, `AT&amp;T;' expands to `AT&#38;T;', which
finally gives the literal text `AT&T;'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]