mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 23:29:56 +03:00
[XPathAbstract] Improve Media Url regex (#2845)
This commit is contained in:
parent
ce63d8a706
commit
65e6d9f454
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue