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>

hi,

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

// send through tidy
tidy_set_encoding('utf8');
tidy_parse_string($text);
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');
tidy_clean_repair();
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
mark
line 1771 column 28 - Warning: replacing invalid character code 136

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

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

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:56 GMT