From 732faa9fb4309221e2bd9b2fda5de44f947133aa Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Wed, 7 Feb 2024 07:49:40 -0500 Subject: [PATCH] Remove invalid condition around image href validation --- src/Svg/Tag/Image.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Svg/Tag/Image.php b/src/Svg/Tag/Image.php index 1689954..de397c4 100644 --- a/src/Svg/Tag/Image.php +++ b/src/Svg/Tag/Image.php @@ -58,14 +58,12 @@ public function start($attributes) $this->document->getSurface()->transform(1, 0, 0, -1, 0, $height); - if ($from === "font-family") { - $scheme = \strtolower(parse_url($this->href, PHP_URL_SCHEME) ?: ""); - if ( - $scheme === "phar" || \strtolower(\substr($this->href, 0, 7)) === "phar://" - || ($this->document->allowExternalReferences === false && $scheme !== "data") - ) { - return; - } + $scheme = \strtolower(parse_url($this->href, PHP_URL_SCHEME) ?: ""); + if ( + $scheme === "phar" || \strtolower(\substr($this->href, 0, 7)) === "phar://" + || ($this->document->allowExternalReferences === false && $scheme !== "data") + ) { + return; } $this->document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height);