diff --git a/composer.json b/composer.json index 38d2b62f7c..01bade2bf1 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ "twig/twig": "1.*", "phpmailer/phpmailer": "~5.2", "cerdic/css-tidy": "*", - "sunra/php-simple-html-dom-parser": "*", "tburry/pquery": "*", "j4mie/paris": "1.5.4", "swiftmailer/swiftmailer": "^5.4", @@ -34,4 +33,4 @@ "Sudzy\\": "lib/Util/Sudzy" } } -} +} \ No newline at end of file diff --git a/lib/Util/CSS.php b/lib/Util/CSS.php index 62ce3e379a..10516ea831 100644 --- a/lib/Util/CSS.php +++ b/lib/Util/CSS.php @@ -187,13 +187,8 @@ class CSS { */ function inlineCSS($url, $contents=null) { - // Download the HTML if it was not provided - if($contents === null) { - $html = HtmlDomParser::file_get_html($url, false, null, -1, -1, true, true, DEFAULT_TARGET_CHARSET, false, DEFAULT_BR_TEXT, DEFAULT_SPAN_TEXT); - } else { - // use the data provided! - $html = HtmlDomParser::str_get_html($contents, true, true, DEFAULT_TARGET_CHARSET, false, DEFAULT_BR_TEXT, DEFAULT_SPAN_TEXT); - } + $html = \pQuery::parseStr($contents); + // $html = HtmlDomParser::str_get_html($contents, true, true, DEFAULT_TARGET_CHARSET, false, DEFAULT_BR_TEXT, DEFAULT_SPAN_TEXT); if(!is_object($html)) { return false; @@ -202,13 +197,13 @@ class CSS { $css_blocks = ''; // Find all