mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-23 13:48:45 +02: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)
|
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…
Add table
Add a link
Reference in a new issue