function checkHeader($url)
{
- if(strpos($url, 'https') !== false)
- {
- $this->jerr('accept HTTP url only!');
- }
+ // if(strpos($url, 'https') !== false)
+ // {
+ // $this->jerr('accept HTTP url only!');
+ // }
$headers = get_headers($url, 1);
if(strpos(is_array($headers['Content-Type']) ? $headers['Content-Type'][0] : $headers['Content-Type'], 'text/html') === false)
{
function convertStyle($url, $file, $is_url = true)
{
+ $inLineCss = true;
+
if($is_url && !empty($url))
{
$host = parse_url($url);
if(!$is_url){
$data = file_get_contents($file);
}
- return $data;
+
+ if(preg_match('/^\s*<!--\s*NOT CONVERT STYLE\s*-->\s*/', $data)){
+ $inLineCss = false;
+ }
libxml_use_internal_errors (true);
$doc = new DOMDocument('1.0', 'UTF-8');
$data = $doc->saveHTML();
- return $data;
+ if(!$inLineCss){
+ return $data;
+ }
$htmldoc = new HTML_CSS_InlineStyle($data);
if(count($this->styleSheets) > 0){