mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 10:35:14 +00:00
Merge branch 'dev' of /home/macgirvin/z into dev
This commit is contained in:
commit
4b3f20d1a3
1 changed files with 4 additions and 2 deletions
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue