note 70032 added to function.tidy-parse-string
| From: | Ard at osu1 dot php dot net | Date: | Sat, 30 Sep 2006 12:27:23 +0000 |
| Subject: | note 70032 added to function.tidy-parse-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117882@lists.php.net to get a copy of this message | ||
On Windows I noticed that tidy wil output a tab if the html-source provided is empty (that is:
"" or null) and show-body-only is used .
Example:
<?php
$html = '';
$tidy = tidy_parse_string($html, array('show-body-only' => true));
echo 'tidied:'; var_dump(tidy_get_output($tidy));
echo 'untidied:'; var_dump($html);
?>
<output>
--------------------
tidied:string(1) ""
untidied:string(0) ""
---------------------------
</output>
string(1) is a tab-character.
Beware of this strange behaviour. Changing indent-option won't help. The documentation says
tab-size
"is used to map tabs to spaces when reading the input.
Tidy never outputs tabs."
http://tidy.sourceforge.net/docs/tidy_man.html
So this isn't the case...
----
Server IP: 83.137.20.120
Probable Submitter: 212.45.32.220 (proxied: 83.247.70.113)
----
Manual Page -- http://www.php.net/manual/en/function.tidy-parse-string.php
Edit -- https://master.php.net/note/edit/70032
Del: integrated -- https://master.php.net/note/delete/70032/integrated
Del: useless -- https://master.php.net/note/delete/70032/useless
Del: bad code -- https://master.php.net/note/delete/70032/bad+code
Del: spam -- https://master.php.net/note/delete/70032/spam
Del: non-english -- https://master.php.net/note/delete/70032/non-english
Del: in docs -- https://master.php.net/note/delete/70032/in+docs
Del: other reasons-- https://master.php.net/note/delete/70032
Reject -- https://master.php.net/note/reject/70032
Search -- https://master.php.net/manage/user-notes.php