PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32
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 +17 -8 6.36.32 View file →
@@ -5,9 +5,9 @@
5 5
6 6 if ( isset( $message ) && '' !== $message ) {
7 7 if ( FrmAppHelper::is_admin() ) {
8 8 echo '<div class="frm_updated_message">';
9 - echo FrmAppHelper::kses( $message, 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
9 + FrmAppHelper::kses_echo( $message, 'all' );
10 10 echo '</div>';
11 11 } else {
12 12 echo FrmAppHelper::maybe_kses( $message ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
13 13 }
@@ -15,12 +15,14 @@
15 15
16 16 if ( ! isset( $show_messages ) ) {
17 17 $show_messages = array();
18 18 }
19 +
19 20 $show_messages = apply_filters( 'frm_message_list', $show_messages );
20 -if ( is_array( $show_messages ) && count( $show_messages ) > 0 ) {
21 +
22 +if ( is_array( $show_messages ) && $show_messages !== array() ) {
21 23 // Define a callback function to add 'data-action' attribute to allowed HTML tags
22 - $add_data_action_callback = function( $allowed_html ) {
24 + $add_data_action_callback = function ( $allowed_html ) {
23 25 $allowed_html['span']['data-action'] = true;
24 26 return $allowed_html;
25 27 };
26 28 ?>
@@ -28,10 +30,13 @@
28 30 <ul id="frm_messages">
29 31 <?php
30 32 // Add the callback function to the 'frm_striphtml_allowed_tags' filter
31 33 add_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
34 +
32 35 foreach ( $show_messages as $m ) {
33 - 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>';
34 39 }
35 40 // Remove the callback function from the 'frm_striphtml_allowed_tags' filter
36 41 remove_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
37 42 ?>
@@ -37,18 +42,20 @@
37 42 ?>
38 43 </ul>
39 44 </div>
40 45 <?php
41 -}
46 +}//end if
42 47
43 48 if ( ! empty( $warnings ) && is_array( $warnings ) ) {
44 49 ?>
45 50 <div class="frm_warning_style inline" role="alert">
46 - <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>
47 52 <ul id="frm_warnings">
48 53 <?php
49 54 foreach ( $warnings as $warning ) {
50 - 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>';
51 58 }
52 59 ?>
53 60 </ul>
54 61 </div>
@@ -60,9 +67,11 @@
60 67 <div class="frm_error_style inline" role="alert">
61 68 <ul id="frm_errors">
62 69 <?php
63 70 foreach ( $errors as $error ) {
64 - 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>';
65 74 }
66 75 ?>
67 76 </ul>
68 77 </div>