- Package:
- tidy
- Source:
- tidy-html5
- Description:
- HTML/XML syntax checker and reformatter
- Submitter:
- Vincent Lefevre
- Date:
- 2025-05-09 15:27:04 UTC
- Severity:
- normal
- Tags:
"tidy -asxhtml -utf8 --add-xml-decl yes" doesn't specify the encoding. The consequence is that the XML processor cannot reliably determine the encoding at that time. For instance, libxml2 will assume that the output encoding should be US-ASCII (though it will be able to read UTF-8 sequences as required), so that echo é | tidy -asxhtml -utf8 --add-xml-decl yes | xmllint - gives: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" /> <title></title> </head> <body> é </body> </html> See the "é" that has been written as a character reference due to the absence of declared encoding. Note that the behavior of xmllint won't change: https://bugzilla.gnome.org/show_bug.cgi?id=350208
I am closing all the bugs that had been filled before 5.8.0 upstream version that are **upstream** issues. If the bug that you've reported can still be found in 5.8.0, please retest this, make sure that the upstream bugs are actually filled upstream and reopen the bug in Debian BTS and correctly set the "forwarded" attribute on the issue. Ondrej -- Ondřej Surý (He/Him) ondrej@sury.org
Control: reopen -1 Control: notfixed -1 2:5.8.0-1 Control: found -1 2:5.8.0-2 Control: tags -1 upstream Control: forwarded -1 https://github.com/htacg/tidy-html5/issues/1147 Done right now. Note that the output has slightly changed, but the issue is still there.