From 84e5304250b8d9a17fad7e429d10f3ac01a7a809 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 20 Aug 2025 15:26:40 +0200 Subject: [PATCH] wait #7637 @2.5 --- src/Graphics/Image.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Graphics/Image.php b/src/Graphics/Image.php index eb4d6e7..38bbb2d 100644 --- a/src/Graphics/Image.php +++ b/src/Graphics/Image.php @@ -67,7 +67,8 @@ class Image } else if ($ext === 'svg') { $svgcontent = file_get_contents($path); try { - $svg = simplexml_load_string($svgcontent); + $svg = simplexml_load_string($svgcontent, 'SimpleXMLElement', LIBXML_PARSEHUGE); + $attr = $svg->attributes(); if (!isset($attr['width']) || !isset($attr['height'])) { $viewbox = trim($attr['viewBox']); -- 2.39.5