aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-08 20:55:34 -0800
committerFriendika <info@friendika.com>2011-02-08 20:55:34 -0800
commit6b8bbef6c795fcf73c7c7271decf0f0bfed158c7 (patch)
tree5018521cad271e9885f600442774065adfe84269
parentf70a0b028288fa13c64f1ffaa310765a95347dac (diff)
downloadvolse-hubzilla-6b8bbef6c795fcf73c7c7271decf0f0bfed158c7.tar.gz
volse-hubzilla-6b8bbef6c795fcf73c7c7271decf0f0bfed158c7.tar.bz2
volse-hubzilla-6b8bbef6c795fcf73c7c7271decf0f0bfed158c7.zip
suppress parse warnings
-rw-r--r--boot.php2
-rw-r--r--include/oembed.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 8492b8be0..3edd45971 100644
--- a/boot.php
+++ b/boot.php
@@ -3,7 +3,7 @@
set_time_limit(0);
define ( 'BUILD_ID', 1038 );
-define ( 'FRIENDIKA_VERSION', '2.10.0905' );
+define ( 'FRIENDIKA_VERSION', '2.10.0906' );
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
define ( 'EOL', "<br />\r\n" );
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";