PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / trunk
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vtrunk
4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 All 135 releases
← All changes | inc/url_replacer.php +4 -0 4.2.7 → trunk View file →
@@ -162,8 +162,12 @@
162 162 $url = ltrim( $url, '/' );
163 163 $url = sprintf( '%s://%s', is_ssl() ? 'https' : 'http', $url );
164 164 }
165 165 $normalized_ext = strtolower( $ext );
166 + $url = esc_url( $url );
167 + if ( empty( $url ) ) {
168 + return $original_url;
169 + }
166 170 if ( isset( Optml_Config::$image_extensions[ $normalized_ext ] ) ) {
167 171 $new_url = $this->normalize_image( $url, $original_url, $args, $is_uploaded, $normalized_ext );
168 172 if ( $is_uploaded ) {
169 173 $new_url = str_replace( '/' . $url, $id_and_filename, $new_url );