ID:               44775
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nick at carbidefinger dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Linux
 PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

isHTML is a Tidy node method, not a tidy object one.


Previous Comments:
------------------------------------------------------------------------

[2008-04-18 15:37:07] nick at carbidefinger dot net

Tidy snippet from phpinfo();

Tidy support     enabled
libTidy Release         6 November 2007
Extension Version       2.0 ($Id: tidy.c,v 1.66.2.8.2.24 2007/09/20 22:25:05
nlopess Exp $)

------------------------------------------------------------------------

[2008-04-18 14:07:27] nick at carbidefinger dot net

there is a typo in my code! doh!

the } following "$this->getResponse()->appendBody("This Page Was Not
Cleaned By Tidy\n");" shouldnt be there (I removed some code from the
post and missed it!)

------------------------------------------------------------------------

[2008-04-18 14:05:49] nick at carbidefinger dot net

Description:
------------
This function is no longer defined, running it results in:

Call to undefined method tidy::isHtml()

Seeing as tidy::isXhtml() is not implemented yet and always returns
false - i'm a bit stuck!

Reproduce code:
---------------
$response = $this->getResponse();
                $tidycf = array(
                                           'indent'         => true,
                                           'output-xhtml'   => true,
                                           'char-encoding' => 'utf8',
                                           'wrap'           => 200);
                
                // Tidy
                if (!$response->isException()) {
                        $tidy = new tidy;
                        $tidy->parseString($response, $tidycf, 'utf8');
                        
                        if ($tidy->isHtml()) {
                                $tidy->cleanRepair();
                                $this->getResponse()->clearBody();
                                echo $tidy;
                        } else {
                                $this->getResponse()->appendBody("This Page Was 
Not Cleaned By
Tidy\n");
                                }
                        }
                }

Expected result:
----------------
Anything that isnt HTML being passed from the $reponse object should
have a string appended to it, any HTML should be cleaned by the tidy
library.

Actual result:
--------------
Fatal error: Call to undefined method tidy::isHtml()


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44775&edit=1

Reply via email to