note 73052 rejected from ref.tidy by nlopess

From: Date: Wed, 07 Feb 2007 15:48:44 +0000
Subject: note 73052 rejected from ref.tidy by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123055@lists.php.net to get a copy of this message
Note Submitter: duarte at uma dot pt ---- I had some problems parsing PHP 4.4.4 pages with Tidy, because of ISO-8859-1 caracters in URL's parameters. If I had an URL like this: <a href="http://www.example.com?search=joão"> When I used Tidy do parse a page with this URL, it was transformed in: <a href="http://www.example.com?search=joão"> The solution was to disable the Tidy option fix-uri which is enabled by default. This option was converting ISO-8859-1 URL's caracters to UTF-8. So the final PHP code to parse the page with Tidy is: /* disable option */ tidy_setopt('fix-uri',0); tidy_setopt('indent', 1); tidy_setopt('wrap', 1024); tidy_setopt('output-xhtml', 1); /* parse page */ tidy_parse_string($vs_page_html); echo tidy_get_output();

« previous php.notes (#123055) next »