mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed using HTML in textarea validation;
This commit is contained in:
@@ -523,10 +523,8 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
}
|
||||
}
|
||||
|
||||
$profile_show_html_bio = UM()->options()->get( 'profile_show_html_bio' );
|
||||
|
||||
if ( $profile_show_html_bio == 1 && $key !== 'description' ) {
|
||||
if ( isset( $array['html'] ) && $array['html'] == 0 ) {
|
||||
if ( isset( $array['type'] ) && $array['type'] == 'textarea' && UM()->profile()->get_show_bio_key( $args ) !== $key ) {
|
||||
if ( ! isset( $array['html'] ) || $array['html'] == 0 ) {
|
||||
if ( wp_strip_all_tags( $args[ $key ] ) != trim( $args[ $key ] ) ) {
|
||||
UM()->form()->add_error( $key, __( 'You can not use HTML tags here', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
@@ -692,7 +692,7 @@ function um_profile_field_filter_xss_validation( $value, $data, $type = '' ) {
|
||||
$value = esc_url( $value );
|
||||
} elseif ( 'textarea' == $type ) {
|
||||
if ( empty( $data['html'] ) ) {
|
||||
$value = wp_kses_post( $value );
|
||||
$value = wp_kses_post( $value );
|
||||
}
|
||||
} elseif ( 'rating' == $type ) {
|
||||
if ( ! is_numeric( $value ) ) {
|
||||
|
||||
Reference in New Issue
Block a user