]> _ Git - cubist_util.git/commitdiff
wait #6611 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Jan 2024 14:08:15 +0000 (15:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Jan 2024 14:08:15 +0000 (15:08 +0100)
src/Graphics/Image.php

index 282fcb7a991a5b5e8748951e4b66bcf6c86500b8..4d787ddc9b81e1c7124e66bbb405227235d08c62 100644 (file)
@@ -6,6 +6,7 @@ use Cubist\PDF\PDFTools;
 use Cubist\Util\Animations\OAMAnimation;
 use Cubist\Util\Animations\ZipAnimation;
 use Cubist\Util\Files\Files;
+use Cubist\Util\Text;
 use Illuminate\Support\Facades\Log;
 
 class Image
@@ -89,7 +90,7 @@ class Image
                 $res = [$zip['width'], $zip['height']];
             }
         } else if ($ext === 'html') {
-            $htmlContent = file_get_contents($path);
+            $htmlContent = Text::normalizeLines(file_get_contents($path));
             if (stristr($htmlContent, '<div id="lottie"></div>')) {
                 if (preg_match('/var animationData = (\{.*\})/', $htmlContent, $m)) {
                     $ad = json_decode(trim($m[1]), true);