diff --git a/integration/HTMLValue.php b/integration/HTMLValue.php index ee38a6535..3ec0a70f8 100755 --- a/integration/HTMLValue.php +++ b/integration/HTMLValue.php @@ -29,6 +29,7 @@ class SS_HTMLValue extends ViewableData { * @return string */ public function getContent() { + $content = $this->cleanContent(); // strip the body tags from the output (which are automatically added by DOMDocument) return preg_replace ( array ( @@ -36,7 +37,7 @@ class SS_HTMLValue extends ViewableData { '/<\/body[^>]*>\s*$/i' ), null, - $this->getDocument()->saveXML($this->getDocument()->documentElement->lastChild) + $content ); } @@ -50,7 +51,44 @@ class SS_HTMLValue extends ViewableData { "
$content