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