X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=ConvertStyle.php;fp=ConvertStyle.php;h=265701da3f9cd5eec6cade6604aa114485a7a0d6;hb=08a7216c41def353546fbe5843939d45235571d0;hp=4179c512638464ddcf5cac0a8ea7e39ca41107af;hpb=d12bb738ba1e03fe4253af79660c48e06a9b54a3;p=Pman.Core diff --git a/ConvertStyle.php b/ConvertStyle.php index 4179c512..265701da 100644 --- a/ConvertStyle.php +++ b/ConvertStyle.php @@ -68,6 +68,8 @@ class Pman_Core_ConvertStyle extends Pman function convertStyle($url, $file, $is_url = true) { + $inLineCss = true; + if($is_url && !empty($url)) { $host = parse_url($url); @@ -91,7 +93,7 @@ class Pman_Core_ConvertStyle extends Pman } if(preg_match('/^\s\s/', $data)){ - return $data; + $inLineCss = false; } libxml_use_internal_errors (true); @@ -144,6 +146,10 @@ class Pman_Core_ConvertStyle extends Pman $data = $doc->saveHTML(); + if(!$inLineCss){ + return $data; + } + $htmldoc = new HTML_CSS_InlineStyle($data); if(count($this->styleSheets) > 0){ foreach ($this->styleSheets as $styleSheet){