mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-17 14:18:35 +01:00
[XPathAbstract] Improve Media Url regex (#2845)
This commit is contained in:
parent
ce63d8a706
commit
65e6d9f454
@ -532,7 +532,7 @@ abstract class XPathAbstract extends BridgeAbstract {
|
|||||||
*/
|
*/
|
||||||
protected function cleanMediaUrl($mediaUrl)
|
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);
|
$result = preg_match($pattern, $mediaUrl, $matches);
|
||||||
if(1 !== $result) {
|
if(1 !== $result) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user