Commit eb8b3442 authored by Tobias Haider's avatar Tobias Haider
Browse files

suppress warnings for malformed html

parent 7a4314e0
......@@ -58,7 +58,9 @@ class TweekiHooks {
$doc = new DOMDocument();
$html = mb_convert_encoding( $text, 'HTML-ENTITIES', 'UTF-8' );
if( $html != '' ) {
libxml_use_internal_errors(true);
$doc->loadHTML( $html );
libxml_clear_errors();
$spans = $doc->getElementsByTagName('span');
foreach( $spans as $span ) {
$mw_headline = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment