euromark 12 年之前
父节点
当前提交
3769ff3e21
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 1 1
      Lib/InlineCssLib.php
  2. 1 1
      Lib/Utility/FileLib.php
  3. 3 1
      Vendor/CssToInlineStyles/CssToInlineStyles.php

+ 1 - 1
Lib/InlineCssLib.php

@@ -75,7 +75,7 @@ class InlineCssLib {
 
 		//fix issue with <html> being added
 		$separator = '~~~~~~~~~~~~~~~~~~~~';
-		if (strpos($html, '<html>') === false) {
+		if (strpos($html, '<html') === false) {
 			$incomplete = true;
 			$html = $separator . $html . $separator;
 		}

+ 1 - 1
Lib/Utility/FileLib.php

@@ -133,7 +133,7 @@ class FileLib extends File {
 		}
 		$success = true;
 		foreach ($data as $row) {
-			if (fputcsv($this->handle, array_values($row), (isset($delimiter) ? $delimiter : ','), (isset($enclosure) ? $enclosure : '"')) === false) {
+			if (fputcsv($this->handle, array_values((array)$row), (isset($delimiter) ? $delimiter : ','), (isset($enclosure) ? $enclosure : '"')) === false) {
 				$success = false;
 			}
 		}

+ 3 - 1
Vendor/CssToInlineStyles/CssToInlineStyles.php

@@ -464,7 +464,9 @@ class CssToInlineStyles
             // Only for >PHP5.4
             // Correct scrambled UTF8 chars (&atilde;&#131;...) back to their correct representation.
             $html = html_entity_decode($html, ENT_XHTML, 'UTF-8');
-            $html = utf8_decode($html);
+            if (DS === '\\') {
+            	$html = utf8_decode($html);
+            }
         }
 
         // cleanup the HTML if we need to