diff --git a/src/my-calendar-categories.php b/src/my-calendar-categories.php index baa505a5..53f6b456 100644 --- a/src/my-calendar-categories.php +++ b/src/my-calendar-categories.php @@ -315,7 +315,7 @@ function mc_update_cat( $category ) { $where = array( 'category_id' => $category_id, ); - $cat_name = strip_tags( $category['category_name'] ); + $cat_name = wp_strip_all_tags( $category['category_name'] ); $term_exists = term_exists( $cat_name, 'mc-event-category' ); if ( ! $term_exists ) { $term = wp_insert_term( $cat_name, 'mc-event-category' ); @@ -354,7 +354,7 @@ function mc_create_category( $category ) { return false; } $formats = array( '%s', '%s', '%s', '%d', '%d' ); - $cat_name = strip_tags( $category['category_name'] ); + $cat_name = wp_strip_all_tags( $category['category_name'] ); $term_exists = term_exists( $cat_name, 'mc-event-category' ); if ( ! $term_exists ) { $term = wp_insert_term( $cat_name, 'mc-event-category' ); @@ -481,7 +481,7 @@ function mc_edit_category_form( $view = 'edit', $cat_id = false ) { $color = ''; $icon = ''; } - $color = strip_tags( $color ); + $color = wp_strip_all_tags( $color ); if ( ! empty( $cur_cat ) && is_object( $cur_cat ) ) { $cat_name = stripslashes( $cur_cat->category_name ); } else { @@ -1112,7 +1112,7 @@ function mc_category_select( $data = false, $option = true, $multiple = false, $ $selected = ( null === $data ) ? '' : ' checked="checked"'; } } - $category_name = strip_tags( stripslashes( trim( $cat->category_name ) ) ); + $category_name = wp_strip_all_tags( stripslashes( trim( $cat->category_name ) ) ); $category_name = ( '' === $category_name ) ? '(' . __( 'Untitled category', 'my-calendar' ) . ')' : $category_name; if ( $multiple ) { $icon = '' . mc_category_icon( $cat ) . ''; diff --git a/src/my-calendar-group-manager.php b/src/my-calendar-group-manager.php index e982206d..885f8474 100644 --- a/src/my-calendar-group-manager.php +++ b/src/my-calendar-group-manager.php @@ -903,7 +903,7 @@ function mc_list_groups() { } } echo wp_kses_post( $spam_label ); - echo '' . esc_html( strip_tags( wp_unslash( $title ) ) ) . ''; + echo '' . esc_html( wp_strip_all_tags( wp_unslash( $title ) ) ) . ''; if ( $can_edit && $edit_link ) { echo ''; } diff --git a/src/my-calendar-output.php b/src/my-calendar-output.php index f1c86f0d..7f8ac533 100644 --- a/src/my-calendar-output.php +++ b/src/my-calendar-output.php @@ -482,7 +482,7 @@ function mc_draw_event_header( $data, $type, $template ) { $hlevel = apply_filters( 'mc_heading_level_table', $hlevel, $type, $time, $template ); // Set up .summary - required once per page for structured data. Should only be added in cases where heading & anchor are removed. if ( 'single' === $type ) { - $title = ( ! is_singular( 'mc-events' ) ) ? "