|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-04-18 14:05 UTC] 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()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 10:00:02 2025 UTC |
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!)