htacg/tidy-html5

Escape more ampersands

jidanni opened this issue · 0 comments

Tidy should escape both ampersands, not just one.

$ echo '<P>x& &x'|tidy -q|grep x
line 1 column 7 - Warning: unescaped & or unknown entity "&x"
"HTML Tidy for HTML5 for Linux version 5.6.0">
<p>x& &amp;x</p>

Well, at least it leaves it alone after one fixes it by hand, and
doesn't make it back to unadorned.

So

--quote-ampersand Boolean (yes if unset)
This option specifies if Tidy should output unadorned &
characters as &amp;.

isn't telling the whole story.