Skip to content

Commit

Permalink
Oops.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 6, 2025
1 parent adc6e9f commit fae742b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/my-calendar-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/my-calendar-locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ) );
}
Expand Down
6 changes: 3 additions & 3 deletions src/templates/legacy-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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 = " <p class='mc-details'><a$aria href='" . esc_url( $permalink ) . "'>$details_label</a></p>\n";
Expand Down

0 comments on commit fae742b

Please sign in to comment.