diff --git a/base.php b/base.php index 9ad0f24..10ca17b 100644 --- a/base.php +++ b/base.php @@ -32,7 +32,7 @@ function html2xhtml ($html) { $doc->loadHTML($html); // Load the HTML $output = utf8_decode($doc->saveXML($doc->documentElement)); // Transform to an Ansi xml stream $output = xml2xhtml($output); // Fix the br / hr ... - if (preg_match ("/(.*)<\/body><\/html>/", $output, $matches)) { + if (preg_match ("#(.*)#ms", $output, $matches)) { $output = $matches [1]; // Remove } return $output;