note 73080 deleted from function.tidy-setopt by nlopess

From: Date: Thu, 08 Feb 2007 12:59:20 +0000
Subject: note 73080 deleted from function.tidy-setopt by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123118@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 (#123118) next »