Skip to content

Commit e746d27

Browse files
author
Andy Meerwaldt
committed
Sanitize the value that got validated
1 parent fc15e77 commit e746d27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/options/class-wpseo-option.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public function validate_url( $key, $dirty, $old, &$clean ) {
335335
if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) {
336336

337337
$submitted_url = trim( htmlspecialchars( $dirty[ $key ] ) );
338-
$validated_url = filter_var( $submitted_url, FILTER_VALIDATE_URL );
338+
$validated_url = filter_var( WPSEO_Utils::sanitize_url( $submitted_url ), FILTER_VALIDATE_URL );
339339

340340
if ( $validated_url === false ) {
341341
if ( function_exists( 'add_settings_error' ) ) {

0 commit comments

Comments
 (0)