1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 22:26:31 +02:00

Hacky full docuement parse thingy removed from DOMLex, fixes barfing on full HTML documents.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@328 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-27 22:06:58 +00:00
parent 24cde9c891
commit 7588068b7b
2 changed files with 3 additions and 6 deletions

View File

@@ -295,10 +295,9 @@ class HTMLPurifier_Lexer
/**
* Takes a string of HTML (fragment or document) and returns the content
*/
function extractBody($html, $return_bool = false) {
function extractBody($html) {
$matches = array();
$result = preg_match('!<body[^>]*>(.+?)</body>!is', $html, $matches);
if ($return_bool) return $result;
if ($result) {
return $matches[1];
} else {