Skip to content

Commit 732faa9

Browse files
committed
Remove invalid condition around image href validation
1 parent 8ffcc41 commit 732faa9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/Svg/Tag/Image.php

+6-8
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@ public function start($attributes)
5858

5959
$this->document->getSurface()->transform(1, 0, 0, -1, 0, $height);
6060

61-
if ($from === "font-family") {
62-
$scheme = \strtolower(parse_url($this->href, PHP_URL_SCHEME) ?: "");
63-
if (
64-
$scheme === "phar" || \strtolower(\substr($this->href, 0, 7)) === "phar://"
65-
|| ($this->document->allowExternalReferences === false && $scheme !== "data")
66-
) {
67-
return;
68-
}
61+
$scheme = \strtolower(parse_url($this->href, PHP_URL_SCHEME) ?: "");
62+
if (
63+
$scheme === "phar" || \strtolower(\substr($this->href, 0, 7)) === "phar://"
64+
|| ($this->document->allowExternalReferences === false && $scheme !== "data")
65+
) {
66+
return;
6967
}
7068

7169
$this->document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height);

0 commit comments

Comments
 (0)