Gleb Arshinov <gleb(a)barsook.com> writes:
>>>>> "Stephen" == Stephen J Turnbull
<stephen(a)xemacs.org> writes:
Stephen> PSGML probably has an `html-unquote' function or
Stephen> something like that.
Last I looked I could not find one. So, I wrote:
[...]
This looks like it mistakenly translates "&lt;" to "<". To
avoid
that bug, handle "&" last.
Also, the docstring is incorrect. To do this right, i.e. convert
"any characters in the region that have special HTML meanings", you
should at least handle """, the numeric, and the hexadecimal
entities in the 0-255 range ("&#ddd;" and "&#xhh").
Also note that the ";" delimiter is optional in some cases; if the
entity is followed by non-alphanumerics or if it is at the end of
buffer, the ";" is optional. "1 < 2" is a valid way to write
"1 <
2" in HTML-ese.