| @@ -17,24 +17,15 @@ | ||
| 17 | 17 | $show_messages = array(); |
| 18 | 18 | } |
| 19 | 19 | $show_messages = apply_filters( 'frm_message_list', $show_messages ); |
| 20 | 20 | if ( is_array( $show_messages ) && count( $show_messages ) > 0 ) { |
| 21 | - // Define a callback function to add 'data-action' attribute to allowed HTML tags | |
| 22 | - $add_data_action_callback = function( $allowed_html ) { | |
| 23 | - $allowed_html['span']['data-action'] = true; | |
| 24 | - return $allowed_html; | |
| 25 | - }; | |
| 26 | 21 | ?> |
| 27 | 22 | <div class="frm_warning_style" role="alert"> |
| 28 | 23 | <ul id="frm_messages"> |
| 29 | 24 | <?php |
| 30 | - // Add the callback function to the 'frm_striphtml_allowed_tags' filter | |
| 31 | - add_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback ); | |
| 32 | 25 | 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 | |
| 26 | + echo '<li>' . FrmAppHelper::kses( $m, array( 'a', 'br', 'span', 'p' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 34 | 27 | } |
| 35 | - // Remove the callback function from the 'frm_striphtml_allowed_tags' filter | |
| 36 | - remove_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback ); | |
| 37 | 28 | ?> |
| 38 | 29 | </ul> |
| 39 | 30 | </div> |
| 40 | 31 | <?php |