Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion includes/class-validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,12 @@ public function validate_fields($data, $type, $fields = false) {
$sanitized_value = wp_kses_post( strip_shortcodes( $value ) );
break;

case 'url':
$sanitized_value = sanitize_url( wp_unslash( $value ) );
break;

default:
$sanitized_value = sanitize_text_field($value);

}
}

Expand Down
10 changes: 8 additions & 2 deletions includes/helpers/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,16 @@ function uwp_get_user_badge($args){
// will be replace in condition check
}

//link url, replace vars
if( !empty( $args['link'] ) && $args['link'] = str_replace("%%input%%", $match_value,$args['link']) ){
// link url, replace vars
if ( ! empty( $args['link'] ) && $args['link'] = str_replace( "%%input%%", $match_value, $args['link'] ) ) {
// will be replace in condition check
if ( ! empty( $field->field_type ) && $field->field_type == 'url' ) {
$args['link'] = esc_url( $args['link'] );
} else {
$args['link'] = esc_attr( $args['link'] );
}
}

if( !empty( $args['link'] ) && $user_id && $args['link'] = str_replace("%%profile_url%%", uwp_build_profile_tab_url($user_id),$args['link']) ){
// will be replace in condition check
}
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ Yes, you can customize it with Elementor, but also with Gutenberg, Divi, Beaver

== Changelog ==

= 1.2.61 - 2026-04-TBD =
* Sanitize URL field types before saving - FIXED/SECURITY

= 1.2.60 - 2026-04-02 =
* WordPress 7.0 compatibility - COMPATIBILITY

Expand Down