aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-02-12 18:31:13 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-02-12 18:31:13 +0100
commit53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1 (patch)
treeeee6bc94d474e327a233c7053beb46d33036a65d /include/oembed.php
parent26dfb73f48d4fcd4671d136e53f52bb81995ea34 (diff)
parent89cbd17c721dae57b18686fd7f3e5f8c74a279d9 (diff)
downloadvolse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.tar.gz
volse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.tar.bz2
volse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.zip
Merge branch 'friendika-master'
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 37923a877..4d6b0af16 100644
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -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";