PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/views/shared/errors.php +11 -5 6.26 → trunk View file →
@@ -18,9 +18,9 @@
18 18 }
19 19
20 20 $show_messages = apply_filters( 'frm_message_list', $show_messages );
21 21
22 -if ( is_array( $show_messages ) && count( $show_messages ) > 0 ) {
22 +if ( is_array( $show_messages ) && $show_messages !== array() ) {
23 23 // Define a callback function to add 'data-action' attribute to allowed HTML tags
24 24 $add_data_action_callback = function ( $allowed_html ) {
25 25 $allowed_html['span']['data-action'] = true;
26 26 return $allowed_html;
@@ -32,9 +32,11 @@
32 32 // Add the callback function to the 'frm_striphtml_allowed_tags' filter
33 33 add_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
34 34
35 35 foreach ( $show_messages as $m ) {
36 - echo '<li>' . FrmAppHelper::kses( $m, array( 'a', 'br', 'span', 'p', 'svg', 'use' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
36 + echo '<li>';
37 + FrmAppHelper::kses_echo( $m, array( 'a', 'br', 'span', 'p', 'svg', 'use' ) );
38 + echo '</li>';
37 39 }
38 40 // Remove the callback function from the 'frm_striphtml_allowed_tags' filter
39 41 remove_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
40 42 ?>
@@ -45,13 +47,15 @@
45 47
46 48 if ( ! empty( $warnings ) && is_array( $warnings ) ) {
47 49 ?>
48 50 <div class="frm_warning_style inline" role="alert">
49 - <div class="frm_warning_heading"> <?php echo esc_html__( 'Warning:', 'formidable' ); ?></div>
51 + <div class="frm_warning_heading"> <?php esc_html_e( 'Warning:', 'formidable' ); ?></div>
50 52 <ul id="frm_warnings">
51 53 <?php
52 54 foreach ( $warnings as $warning ) {
53 - echo '<li>' . FrmAppHelper::kses( $warning, array( 'a', 'br' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
55 + echo '<li>';
56 + FrmAppHelper::kses_echo( $warning, array( 'a', 'br' ) );
57 + echo '</li>';
54 58 }
55 59 ?>
56 60 </ul>
57 61 </div>
@@ -63,9 +67,11 @@
63 67 <div class="frm_error_style inline" role="alert">
64 68 <ul id="frm_errors">
65 69 <?php
66 70 foreach ( $errors as $error ) {
67 - echo '<li>' . FrmAppHelper::kses( $error, array( 'a', 'br' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
71 + echo '<li>';
72 + FrmAppHelper::kses_echo( $error, array( 'a', 'br' ) );
73 + echo '</li>';
68 74 }
69 75 ?>
70 76 </ul>
71 77 </div>