Skip to content

Commit

Permalink
Fix double urlencoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Aug 17, 2023
1 parent 029f8e4 commit b3735f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Rewriters/Urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function filterImgTag(string $html): string
return $html;
}

$image = new Image($src);
$image = new Image(
htmlspecialchars_decode($src)
);
$html = preg_replace(
'/ src="([^"]+)"/',
sprintf(' src="%s"', $image->url()),
Expand Down

0 comments on commit b3735f8

Please sign in to comment.