From ae671b911f1b77c2210ad48448204a47abfb0135 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 25 Jun 2025 11:51:17 +0200 Subject: [PATCH] wait #7612 --- src/Graphics/Lottie.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Graphics/Lottie.php b/src/Graphics/Lottie.php index a03f939..8e888f1 100644 --- a/src/Graphics/Lottie.php +++ b/src/Graphics/Lottie.php @@ -15,7 +15,7 @@ class Lottie public static function getAnimationDataFromHTMLFile($path) { $htmlContent = Text::fileGetContentsNormalizedLines($path); - if (stristr($htmlContent, '
')) { + if (self::isLottie($htmlContent)) { if (preg_match('/var animationData = (\{.*\})/', $htmlContent, $m)) { return json_decode(trim($m[1]), true); } @@ -23,4 +23,9 @@ class Lottie return false; } + public static function isLottie($html) + { + return stristr($html, '
'); + } + } \ No newline at end of file -- 2.39.5