aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/oembed.php')
-rw-r--r--include/oembed.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/oembed.php b/include/oembed.php
index b6060c878..01cd8945f 100644
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -433,9 +433,12 @@ function oembed_html2bbcode($text) {
$html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text));
// If it doesn't parse at all, just return the text.
- $dom = @DOMDocument::loadHTML($html_text);
+
+ $dom = new DOMDocument;
+ @$dom->loadHTML($html_text);
if(! $dom)
return $text;
+
$xpath = new DOMXPath($dom);
$attr = "oembed";