diff --git a/core/um-actions-form.php b/core/um-actions-form.php index 66a231b1..6b805ff4 100644 --- a/core/um-actions-form.php +++ b/core/um-actions-form.php @@ -210,10 +210,14 @@ $ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) ); } } - - if ( isset( $array['html'] ) && $array['html'] == 0 ) { - if ( wp_strip_all_tags( $args[$key] ) != trim( $args[$key] ) ) { - $ultimatemember->form->add_error($key, __('You can not use HTML tags here','ultimatemember') ); + + $profile_show_html_bio = um_get_option('profile_show_html_bio'); + + if( $profile_show_html_bio == 1 && $key !== "description" ){ + if ( isset( $array['html'] ) && $array['html'] == 0 ) { + if ( wp_strip_all_tags( $args[$key] ) != trim( $args[$key] ) ) { + $ultimatemember->form->add_error($key, __('You can not use HTML tags here','ultimatemember') ); + } } } @@ -440,8 +444,8 @@ if ( isset( $args['description'] ) ) { $max_chars = um_get_option('profile_bio_maxchars'); - if ( strlen( utf8_decode( $args['description'] ) ) > $max_chars && $max_chars ) { - $ultimatemember->form->add_error('description', sprintf(__('Your user description must contain less than %s characters','ultimatemember'), $max_chars ) ); + if ( strlen( utf8_decode( $args['description'] ) ) > $max_chars && $max_chars ) { + $ultimatemember->form->add_error('description', sprintf(__('Your user description must contain less than %s characters','ultimatemember'), $max_chars ) ); } }