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' ) ) ? "

$image
$event_title

\n" : ' ' . strip_tags( $event_title ) . ''; + $title = ( ! is_singular( 'mc-events' ) ) ? "

$image
$event_title

\n" : ' ' . wp_strip_all_tags( $event_title ) . ''; } elseif ( 'list' !== $type || ( 'list' === $type && 'true' === mc_get_option( 'list_link_titles' ) ) ) { /** * Filter event title inside event heading. @@ -500,7 +500,7 @@ function mc_draw_event_header( $data, $type, $template ) { } else { $title = ''; } - $header .= ( false === stripos( $title, 'summary' ) ) ? ' ' . strip_tags( $event_title ) . '' : $title; + $header .= ( false === stripos( $title, 'summary' ) ) ? ' ' . wp_strip_all_tags( $event_title ) . '' : $title; return '
' . $header . '
'; } @@ -1277,7 +1277,7 @@ function mc_event_filter( $title ) { $template = mc_get_option( 'event_title_template', '' ); $template = ( '' !== $template ) ? stripslashes( $template ) : '{title} / {date}'; - return esc_html( strip_tags( stripslashes( mc_draw_template( $array, $template ) ) ) ); + return esc_html( wp_strip_all_tags( stripslashes( mc_draw_template( $array, $template ) ) ) ); } else { return $title; } @@ -1786,7 +1786,7 @@ function my_calendar( $args ) { $show_weekends = ( 'true' === $params['weekends'] ) ? true : false; $id = $params['id']; $main_class = ( '' !== $id ) ? $id : 'all'; - $cid = ( isset( $_GET['cid'] ) ) ? esc_attr( strip_tags( $_GET['cid'] ) ) : $main_class; + $cid = ( isset( $_GET['cid'] ) ) ? esc_attr( wp_strip_all_tags( $_GET['cid'] ) ) : $main_class; $lang = ( $switched ) ? ' lang="' . esc_attr( $switched ) . '"' : ''; $body_classes = array( 'mc-main', @@ -2760,7 +2760,7 @@ function my_calendar_locations_list( $show = 'list', $datatype = 'id', $group = } foreach ( $qsa as $name => $argument ) { if ( 'loc' !== $name && 'ltype' !== $name ) { - $output .= "\n" . ''; + $output .= "\n" . ''; } } } diff --git a/src/my-calendar-templating.php b/src/my-calendar-templating.php index 2ca59a6c..260d518b 100644 --- a/src/my-calendar-templating.php +++ b/src/my-calendar-templating.php @@ -646,7 +646,7 @@ function mc_key_exists( $key ) { */ function mc_create_template( $template, $post = array() ) { $key = md5( $template ); - $description = strip_tags( $post['mc_template_key'] ); + $description = wp_strip_all_tags( $post['mc_template_key'] ); update_option( "mc_template_desc_$key", $description ); update_option( "mc_ctemplate_$key", $template ); @@ -699,7 +699,7 @@ function mc_admin_template_description( $key ) { } if ( ! mc_is_core_template( $key ) ) { - $return = strip_tags( stripslashes( get_option( "mc_template_desc_$key" ) ) ); + $return = wp_strip_all_tags( stripslashes( get_option( "mc_template_desc_$key" ) ) ); } return wpautop( $return );