Skip to content

Commit c814d15

Browse files
chore: rebase to development
1 parent 47bd1f7 commit c814d15

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,10 +1962,10 @@ public function feedzy_blacklist_images() {
19621962
*/
19631963
public function feedzy_image_encode( $img_url ) {
19641964
// 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] ) ) {
19691969
$img_url = $matches[0][0];
19701970
}
19711971
}

0 commit comments

Comments
 (0)