Skip to content

Commit e7cea77

Browse files
fix: escape URLs to prevent XSS
1 parent cffb4df commit e7cea77

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

inc/url_replacer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public function build_url(
163163
$url = sprintf( '%s://%s', is_ssl() ? 'https' : 'http', $url );
164164
}
165165
$normalized_ext = strtolower( $ext );
166+
$url = esc_url( $url );
166167
if ( isset( Optml_Config::$image_extensions[ $normalized_ext ] ) ) {
167168
$new_url = $this->normalize_image( $url, $original_url, $args, $is_uploaded, $normalized_ext );
168169
if ( $is_uploaded ) {

0 commit comments

Comments
 (0)