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 ) ) {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
|
||||
|
||||
<div class="um-form">
|
||||
|
||||
|
||||
<form method="post" action="">
|
||||
<input type="hidden" name="_um_password_change" id="_um_password_change" value="1" />
|
||||
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( $args['user_id'] ); ?>" />
|
||||
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>">
|
||||
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
|
||||
|
||||
<?php
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user