File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1962,10 +1962,10 @@ public function feedzy_blacklist_images() {
1962
1962
*/
1963
1963
public function feedzy_image_encode ( $ img_url ) {
1964
1964
// Check if img url is set as an URL parameter.
1965
- $ url_tab = wp_parse_url ( $ img_url );
1966
- if ( isset ( $ url_tab ['query ' ] ) ) {
1967
- preg_match_all ( '/(http|https):\/\/[^ ]+(\.gif|\.GIF|\. jpg|\.JPG|\. jpeg|\.JPEG|\. png|\.PNG|\. webp|\.WEBP|\. avif|\.AVIF)/ ' , $ url_tab ['query ' ], $ matches );
1968
- if ( isset ( $ matches [0 ][0 ] ) ) {
1965
+ $ parsed_url = wp_parse_url ( $ img_url );
1966
+ if ( isset ( $ parsed_url ['query ' ] ) ) {
1967
+ preg_match_all ( '/(http|https):\/\/[^ ]+(\.( gif|jpg|jpeg|png|webp|avif))/i ' , $ parsed_url ['query ' ], $ matches );
1968
+ if ( isset ( $ matches [0 ][0 ] ) && $ this -> is_image_url ( $ matches [ 0 ][ 0 ] ) ) {
1969
1969
$ img_url = $ matches [0 ][0 ];
1970
1970
}
1971
1971
}
You can’t perform that action at this time.
0 commit comments