aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-11-08 18:13:27 +0100
committerMax Kostikov <max@kostikov.co>2019-11-08 18:13:27 +0100
commitc6e9bca76ca6c077aedcb3bb46eef182592bfc6a (patch)
treed63be67b6c55f2f17496e8b4fc1796cb88b7960e /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php
parent9360148829bb32351d40b2b552ea40ea3878b3b5 (diff)
parentbcd0802ea4a23971b5d53892c7de4e9e1822309f (diff)
downloadvolse-hubzilla-c6e9bca76ca6c077aedcb3bb46eef182592bfc6a.tar.gz
volse-hubzilla-c6e9bca76ca6c077aedcb3bb46eef182592bfc6a.tar.bz2
volse-hubzilla-c6e9bca76ca6c077aedcb3bb46eef182592bfc6a.zip
Merge branch 'cherry-pick-2df15f35' into 'dev'
update composer libs See merge request hubzilla/core!1773
Diffstat (limited to 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php')
-rw-r--r--vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php
index b573426de..ca5f25b84 100644
--- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php
+++ b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php
@@ -74,7 +74,12 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
}
set_error_handler(array($this, 'muteErrorHandler'));
- $doc->loadHTML($html, $options);
+ // loadHTML() fails on PHP 5.3 when second parameter is given
+ if ($options) {
+ $doc->loadHTML($html, $options);
+ } else {
+ $doc->loadHTML($html);
+ }
restore_error_handler();
$body = $doc->getElementsByTagName('html')->item(0)-> // <html>