diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php
index 31d473fb..4a5be146 100644
--- a/includes/core/class-fields.php
+++ b/includes/core/class-fields.php
@@ -508,26 +508,25 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
*
* @return string
*/
- function field_error( $text, $force_show = false ) {
+ public function field_error( $text, $force_show = false ) {
if ( empty( $text ) ) {
return '';
}
if ( $force_show ) {
- $output = '
' . esc_attr( $text ) . '
';
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
return $output;
}
-
- if ( isset( $this->set_id ) && UM()->form()->processing == $this->set_id ) {
- $output = '' . esc_attr( $text ) . '
';
+ if ( isset( $this->set_id ) && UM()->form()->processing === $this->set_id ) {
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
} else {
$output = '';
}
if ( ! UM()->form()->processing ) {
- $output = '' . esc_attr( $text ) . '
';
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
}
return $output;
@@ -542,26 +541,25 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
*
* @return string
*/
- function field_notice( $text, $force_show = false ) {
+ public function field_notice( $text, $force_show = false ) {
if ( empty( $text ) ) {
return '';
}
if ( $force_show ) {
- $output = '' . esc_attr( $text ) . '
';
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
return $output;
}
-
- if ( isset( $this->set_id ) && UM()->form()->processing == $this->set_id ) {
- $output = '' . esc_attr( $text ) . '
';
+ if ( isset( $this->set_id ) && UM()->form()->processing === $this->set_id ) {
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
} else {
$output = '';
}
if ( ! UM()->form()->processing ) {
- $output = '' . esc_attr( $text ) . '
';
+ $output = '' . wp_kses( $text, UM()->get_allowed_html( 'templates' ) ) . '
';
}
return $output;