W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2007

libtidy-php: does not clean invalid character refs

From: Felix Natter <felix.natter@smail.inf.fh-bonn-rhein-sieg.de>
Date: Tue, 23 Jan 2007 15:21:50 +0100
To: html-tidy@w3.org
Message-Id: <1169562111.5408.15.camel@localhost.localdomain>


I am using the following code to automatically create correct xhtml:

// send through tidy
tidy_setopt('output-xhtml', true);
tidy_setopt('add-xml-decl', true);
tidy_setopt('show-errors', true);
tidy_setopt('show-warnings', true);
tidy_setopt('indent', true);
tidy_setopt('clean-output', true);
tidy_setopt('clean', true);
tidy_setopt('input-encoding', 'utf8');
tidy_setopt('output-encoding', 'utf8');
echo tidy_get_output();

And the output still contains invalid character references because
this still shows when I run the command-line tidy over the result:

line 1567 column 31 - Warning: replacing invalid character code 145
line 1573 column 31 - Warning: replacing invalid character code 145
line 1579 column 33 - Warning: replacing invalid character code 145
line 1712 column 45 - Warning: <a> attribute with missing trailing quote
line 1771 column 28 - Warning: replacing invalid character code 136

How can I get libtidy under PHP to fix these "invalid character

I am using libtidy 20050415-1 on debian sarge with php-tidy 1.2 (which
seems to be no longer maintained).

Felix Natter <felix.natter@smail.inf.fh-brs.de>
Received on Tuesday, 23 January 2007 18:43:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:56 UTC