note 77932 added to function.tidy-get-body

From: Date: Thu, 20 Sep 2007 12:32:02 +0000
Subject: note 77932 added to function.tidy-get-body
Groups: php.notes 
Request: Send a blank email to php-notes+get-130628@lists.php.net to get a copy of this message
Make sure your site has a body tag before using this function (or get the whole page, and use other tidy functions to navigate to the body)! If it's a (syntactically) incorrect page, you can even get a segmentation fault. #!/usr/bin/php <? /* $file_data=' <html> <frameset > </frameset> </html> '; */ $file_data=' <frameset > </frameset> '; $t=tidy_parse_string(trim($file_data)); $t->cleanRepair(); echo "following line segfaults..\n"; $body=tidy_get_body($t); echo "..or works?\n"; ?> output: nyos@falken:~/webmasters/tidybug$ ./tidy.php following line segfaults.. Segmentation fault (core dumped) (bug will be reported soon) ---- Server IP: 195.56.193.13 Probable Submitter: 81.0.97.154 ---- Manual Page -- http://www.php.net/manual/en/function.tidy-get-body.php Edit -- https://master.php.net/note/edit/77932 Del: integrated -- https://master.php.net/note/delete/77932/integrated Del: useless -- https://master.php.net/note/delete/77932/useless Del: bad code -- https://master.php.net/note/delete/77932/bad+code Del: spam -- https://master.php.net/note/delete/77932/spam Del: non-english -- https://master.php.net/note/delete/77932/non-english Del: in docs -- https://master.php.net/note/delete/77932/in+docs Del: other reasons-- https://master.php.net/note/delete/77932 Reject -- https://master.php.net/note/reject/77932 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130628) next »