| Description: |
' is not a valid HTML entity [1] but it is valid in XML [2].
XHTML is supposed to be valid XML, W3C says [3]:
> The named character reference ' (the apostrophe,
> U+0027) was introduced in XML 1.0 but does not appear
> in HTML. Authors should therefore use ' instead of
> ' to work as expected in HTML 4 user agents.
The point here is ' might be used in XHTML pages (not everybody follows W3C advices, this is real world), and anyway ::htmlparse::mapEscapes might be used on XML trees, so I think it should handle ' as well.
How to reproduce:
Use ::htmlparse::mapEscapes on a string containing '''.
Actual result:
% package require htmlparse
1.1.2
% ::htmlparse::mapEscapes { J.D. 'Boss' Hogg }
J.D. 'Boss' Hogg
Expected result:
Map the ' entity to an apostrophe:
% ::htmlparse::mapEscapes { J.D. 'Boss' Hogg }
J.D. 'Boss' Hogg
[1] http://www.w3.org/TR/html4/sgml/entities.html
[2] http://www.w3.org/TR/REC-xml/
[3] http://www.w3.org/TR/xhtml1/#C_16
|