Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-03-10 18:15:02 -08:00
commit 4b3f20d1a3

View file

@ -177,7 +177,8 @@ function oembed_fetch_url($embedurl){
logger('fetch failure: ' . $furl); logger('fetch failure: ' . $furl);
if($html_text) { if($html_text) {
$dom = DOMDocument::loadHTML($html_text); $dom = new DOMDocument();
@$dom->loadHTML($html_text);
if ($dom) { if ($dom) {
$xpath = new DOMXPath($dom); $xpath = new DOMXPath($dom);
$attr = "oembed"; $attr = "oembed";
@ -424,7 +425,8 @@ function oembed_html2bbcode($text) {
$html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text)); $html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text));
// If it doesn't parse at all, just return the 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) { if ($dom) {
$xpath = new DOMXPath($dom); $xpath = new DOMXPath($dom);
$attr = "oembed"; $attr = "oembed";