diff --git a/src/my-calendar-ajax.php b/src/my-calendar-ajax.php index f78008fe..86b94b5a 100644 --- a/src/my-calendar-ajax.php +++ b/src/my-calendar-ajax.php @@ -39,7 +39,7 @@ function mc_core_autocomplete_search_pages() { foreach ( $posts as $post ) { $response[] = array( 'post_id' => absint( $post->ID ), - 'post_title' => esc_html( html_entity_decode( wp_strip_all_tags(( $post->post_title ) ) ), + 'post_title' => esc_html( html_entity_decode( wp_strip_all_tags( $post->post_title ) ) ), ); } wp_send_json( @@ -362,7 +362,7 @@ function mc_core_autocomplete_search_locations() { foreach ( $locations as $location ) { $response[] = array( 'location_id' => (int) $location->location_id, - 'location_label' => esc_html( wp_strip_all_tags(( $location->location_label ) ), + 'location_label' => esc_html( wp_strip_all_tags( $location->location_label ) ), ); } wp_send_json( diff --git a/src/my-calendar-locations.php b/src/my-calendar-locations.php index b2f2621d..7c944734 100644 --- a/src/my-calendar-locations.php +++ b/src/my-calendar-locations.php @@ -144,7 +144,7 @@ function mc_update_location_custom_fields( $post_id, $post, $data, $location_id if ( isset( $post[ $name ] ) ) { if ( ! isset( $field['sanitize_callback'] ) || ( isset( $field['sanitize_callback'] ) && ! function_exists( $field['sanitize_callback'] ) ) ) { // if no sanitization is provided, we'll prep it for SQL and strip tags. - $sanitized = sanitize_text_field( wp_strip_all_tags(( urldecode( $post[ $name ] ) ) ); + $sanitized = sanitize_text_field( wp_strip_all_tags( urldecode( $post[ $name ] ) ) ); } else { $sanitized = call_user_func( $field['sanitize_callback'], urldecode( $post[ $name ] ) ); } diff --git a/src/templates/legacy-functions.php b/src/templates/legacy-functions.php index 1c072ea2..1ff6e22e 100644 --- a/src/templates/legacy-functions.php +++ b/src/templates/legacy-functions.php @@ -79,7 +79,7 @@ function mc_legacy_template_draw_event( $event, $type, $process_date, $time, $te if ( false === $details ) { $details = wp_kses_post( mc_get_details( $tags, $template, $type ) ); // Set details to false if it has no content. - $details = ( '' === trim( strip_tags( $details ) ) ) ? false : $details; + $details = ( '' === trim( wp_strip_all_tags( $details ) ) ) ? false : $details; } } @@ -149,8 +149,8 @@ function mc_legacy_template_draw_event( $event, $type, $process_date, $time, $te $permalink = mc_get_permalink( $event ); $aria = ''; // If the event title is already in the details label, omit ARIA. - if ( false === stripos( strip_tags( $details_label ), strip_tags( $event_title ) ) ) { - $aria = " aria-label='" . esc_attr( "$details_label: " . strip_tags( $event_title ) ) . "'"; + if ( false === stripos( wp_strip_all_tags( $details_label ), wp_strip_all_tags( $event_title ) ) ) { + $aria = " aria-label='" . esc_attr( "$details_label: " . wp_strip_all_tags( $event_title ) ) . "'"; } if ( _mc_is_url( $permalink ) ) { $more = "
\n";