public function getHTML()
    {
        $dom = new DOMDocument();

        $interceptor = new ErrorInterceptor(array($dom, 'loadHTML'));
        $interceptor->registerError(E_WARNING, "DOMDocument::loadHTML");

        $interceptor->execute($this->html);
        $body = $dom->getElementsByTagName('body')->item(0);

        $this->sanitizeNode($body);

        $html = "";
        foreach ($body->childNodes as $n)
            $html .= $dom->saveHTML($n);

        return $html;
    }
public function getHTML()
    {
        $dom = new DOMDocument();

        $interceptor = new ErrorInterceptor(array($dom, 'loadHTML'));
        $interceptor->registerError(E_WARNING, "DOMDocument::loadHTML");

        $interceptor->execute($this->html);
        $body = $dom->getElementsByTagName('body')->item(0);

        $this->sanitizeNode($body);

        $html = "";
        foreach ($body->childNodes as $n)
            $html .= $dom->saveHTML($n);

        return $html;
    }
public function getHTML ( ) { $ dom = new DOMDocument ( ) ; $ interceptor = new ErrorInterceptor ( array ( $ dom , 'loadHTML' ) ) ; $ interceptor -> registerError ( E_WARNING , "DOMDocument::loadHTML" ) ; $ interceptor -> execute ( $ this -> html ) ; $ body = $ dom -> getElementsByTagName ( 'body' ) -> item ( 0 ) ; $ this -> sanitizeNode ( $ body ) ; $ html = "" ; foreach ( $ body -> childNodes as $ n ) $ html .= $ dom -> saveHTML ( $ n ) ; return $ html ; }
Return the sanitized HTML, according to the set up list of tags and attributes.
@return string The sanitized HTML
Return the sanitized HTML according to the set up list of tags and attributes .