[XPathAbstract] Improve Media Url regex (#2845)

This commit is contained in:
Yaman Qalieh 2022-06-18 20:19:32 -04:00 committed by GitHub
parent ce63d8a706
commit 65e6d9f454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;