From 9bbad3ce21db55055a2acc4a6e2b8ed75810ad95 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Tue, 31 Oct 2023 11:53:47 +0200 Subject: [PATCH 1/2] - fix special characters in social urls --- includes/core/class-form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/class-form.php b/includes/core/class-form.php index 4345c495..5f270f77 100644 --- a/includes/core/class-form.php +++ b/includes/core/class-form.php @@ -783,7 +783,7 @@ if ( ! class_exists( 'um\core\Form' ) ) { $f = UM()->builtin()->get_a_field( $k ); if ( is_array( $f ) && array_key_exists( 'match', $f ) && array_key_exists( 'advanced', $f ) && 'social' === $f['advanced'] ) { - $v = sanitize_text_field( $form[ $k ] ); + $v = sanitize_text_field( urldecode( $form[ $k ] ) ); // Make a proper social link if ( ! empty( $v ) ) { From 16d376d91a9c34ff5b8d0f945a2453889d54d37b Mon Sep 17 00:00:00 2001 From: ashubawork Date: Tue, 21 Nov 2023 14:28:19 +0200 Subject: [PATCH 2/2] - fix social url with the esc_url_raw() --- includes/core/class-form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/class-form.php b/includes/core/class-form.php index 5f270f77..13db079f 100644 --- a/includes/core/class-form.php +++ b/includes/core/class-form.php @@ -783,7 +783,7 @@ if ( ! class_exists( 'um\core\Form' ) ) { $f = UM()->builtin()->get_a_field( $k ); if ( is_array( $f ) && array_key_exists( 'match', $f ) && array_key_exists( 'advanced', $f ) && 'social' === $f['advanced'] ) { - $v = sanitize_text_field( urldecode( $form[ $k ] ) ); + $v = esc_url_raw( $form[ $k ] ); // Make a proper social link if ( ! empty( $v ) ) {