diff --git a/tcpdf.php b/tcpdf.php index 48ae2b9..3d80ac5 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -19055,7 +19055,7 @@ class TCPDF { if ($imgsrc[0] === '@') { // data stream $imgsrc = '@'.base64_decode(substr($imgsrc, 1)); - $type = preg_match('/]*)>/si', $imgsrc) ? 'svg' : ''; + $type = preg_match('/]*\bxmlns\s*=\s*"http:\/\/www\.w3\.org\/2000\/svg"[^>]*>.*<\/svg>/is', $imgsrc) ? 'svg' : ''; } else if (preg_match('@^data:image/([^;]*);base64,(.*)@', $imgsrc, $reg)) { $imgsrc = '@'.base64_decode($reg[2]); $type = $reg[1];