mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 01:25:21 +02:00
suppress parse warnings
This commit is contained in:
parent
f70a0b0282
commit
6b8bbef6c7
2 changed files with 5 additions and 2 deletions
|
@ -79,7 +79,10 @@ function oe_get_inner_html( $node ) {
|
|||
* and replace it with [embed]url[/embed]
|
||||
*/
|
||||
function oembed_html2bbcode($text) {
|
||||
$dom = DOMDocument::loadHTML($text);
|
||||
// If it doesn't parse at all, just return the text.
|
||||
$dom = @DOMDocument::loadHTML($text);
|
||||
if(! $dom)
|
||||
return $text;
|
||||
$xpath = new DOMXPath($dom);
|
||||
$attr = "oembed";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue