diff options
author | Mario <mario@mariovavti.com> | 2021-02-17 18:14:29 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-02-17 18:14:29 +0000 |
commit | 27577824de3918c2f44c236916f3b2faeb92ec4f (patch) | |
tree | 38447dac5a54d6d076f7220f53b01d02d054f70a /include/oembed.php | |
parent | 281b2261aff9919e208562466e7969ccae26d9a0 (diff) | |
download | volse-hubzilla-27577824de3918c2f44c236916f3b2faeb92ec4f.tar.gz volse-hubzilla-27577824de3918c2f44c236916f3b2faeb92ec4f.tar.bz2 volse-hubzilla-27577824de3918c2f44c236916f3b2faeb92ec4f.zip |
fix php8 issue in include/oembed and unencapsulate for zot_refresh()
Diffstat (limited to 'include/oembed.php')
-rw-r--r-- | include/oembed.php | 5 |
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"; |