From 65e6d9f454021b07f90d6b4800db3747e58f8e3c Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Sat, 18 Jun 2022 20:19:32 -0400 Subject: [PATCH] [XPathAbstract] Improve Media Url regex (#2845) --- lib/XPathAbstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/XPathAbstract.php b/lib/XPathAbstract.php index 7a56050d..0ca1587b 100644 --- a/lib/XPathAbstract.php +++ b/lib/XPathAbstract.php @@ -532,7 +532,7 @@ abstract class XPathAbstract extends BridgeAbstract { */ protected function cleanMediaUrl($mediaUrl) { - $pattern = '~(?:http(?:s)?:)?[\/a-zA-Z0-9\-_\.\%]+\.(?:jpg|gif|png|jpeg|ico|mp3){1}~i'; + $pattern = '~(?:http(?:s)?:)?[\/a-zA-Z0-9\-=_,\.\%]+\.(?:jpg|gif|png|jpeg|ico|mp3|webp){1}~i'; $result = preg_match($pattern, $mediaUrl, $matches); if(1 !== $result) { return;