From 654590da152513c30b597bf34448b10eea2535b5 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Sat, 30 Oct 2021 03:39:27 +0000 Subject: [PATCH] added esc_attr --- inc/mep_event_meta.php | 8 ++-- inc/mep_extra_price.php | 22 ++++----- inc/mep_functions.php | 54 +++++++++++------------ inc/mep_user_custom_style.php | 18 ++++---- lib/classes/class-form-fields-wrapper.php | 44 +++++++++--------- lib/classes/class-meta-box.php | 4 +- lib/classes/class-taxonomy-edit.php | 2 +- 7 files changed, 76 insertions(+), 76 deletions(-) diff --git a/inc/mep_event_meta.php b/inc/mep_event_meta.php index 340a405..5d37d9d 100644 --- a/inc/mep_event_meta.php +++ b/inc/mep_event_meta.php @@ -1292,7 +1292,7 @@ function mep_event_meta_save($post_id) $mdate = []; if (isset($_POST['post_author_gutenberg'])) { - $wpdb->get_results("UPDATE " . $table_name . " SET post_author=" . $_POST['post_author_gutenberg'] . " WHERE ID=" . $pid); + $wpdb->get_results("UPDATE " . $table_name . " SET post_author=" . mage_array_strip($_POST['post_author_gutenberg']) . " WHERE ID=" . $pid); } $mcount = count($more_start_date); @@ -1422,19 +1422,19 @@ function mep_event_meta_save($post_id) update_post_meta($pid, '_sku', $sku); update_post_meta($pid, 'mep_member_only_user_role', $mep_member_only_user_role); - if (isset($_POST['mep_event_type']) && strip_tags($_POST['mep_event_type'])) { + if (isset($_POST['mep_event_type']) && mage_array_strip($_POST['mep_event_type'])) { $mep_event_type = 'online'; } else { $mep_event_type = 'offline'; } - if (isset($_POST['mep_member_only_event']) && strip_tags($_POST['mep_member_only_event'])) { + if (isset($_POST['mep_member_only_event']) && mage_array_strip($_POST['mep_member_only_event'])) { $mep_event_member_type = 'member_only'; } else { $mep_event_member_type = 'for_all'; } update_post_meta($pid, 'mep_member_only_event', $mep_event_member_type); update_post_meta($pid, 'mep_event_type', $mep_event_type); - $mp_event_virtual_type_des = isset($_POST['mp_event_virtual_type_des']) ? htmlspecialchars($_POST['mp_event_virtual_type_des']) : ""; + $mp_event_virtual_type_des = isset($_POST['mp_event_virtual_type_des']) ? htmlspecialchars(mage_array_strip($_POST['mp_event_virtual_type_des'])) : ""; update_post_meta($pid, 'mp_event_virtual_type_des', $mp_event_virtual_type_des); diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index b339d31..69220db 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -147,8 +147,8 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item) foreach ($ticket_type_arr as $_event_recurring_date) { if ($hide_date_status == 'no') { ?> -
  • :
  • +
  • :
  • -
  • :
  • +
  • :
  • -
  • :
  • +
  • :
  • -
  • :
  • +
  • :
  • -
  • :
  • +
  • :
  • 0) { @@ -221,7 +221,7 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item) } if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) { foreach ($event_extra_service as $extra_service) { - echo '
  • ' . $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid, $extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ' . wc_price(mep_get_price_including_tax($eid, (float) $extra_service['service_price'] * (float) $extra_service['service_qty'])) . '
  • '; + echo '
  • ' . esc_attr($extra_service['service_name']) . " - " . wc_price(esc_attr(mep_get_price_including_tax($eid, $extra_service['service_price']))) . ' x ' . esc_attr($extra_service['service_qty']) . ' = ' . wc_price(esc_attr(mep_get_price_including_tax($eid, (float) $extra_service['service_price'] * (float) $extra_service['service_qty']))) . '
  • '; } } do_action('mep_after_cart_item_display_list', $cart_item); diff --git a/inc/mep_functions.php b/inc/mep_functions.php index 046601d..1bd2f2f 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -3144,55 +3144,55 @@ if (!function_exists('mep_cart_display_user_list')) { ?> ' . $ticket['ticket_name'] . " - " . wc_price(mep_get_price_including_tax($eid, $ticket['ticket_price'])) . ' x ' . $ticket['ticket_qty'] . ' = ' . wc_price(mep_get_price_including_tax($eid, (float)$ticket['ticket_price'] * (float)$ticket['ticket_qty'])) . ''; + echo '
  • ' . esc_attr($ticket['ticket_name']) . " - " . wc_price(esc_attr(mep_get_price_including_tax($eid, $ticket['ticket_price']))) . ' x ' . esc_attr($ticket['ticket_qty']) . ' = ' . wc_price(esc_attr(mep_get_price_including_tax($eid, (float)$ticket['ticket_price'] * (float)$ticket['ticket_qty']))) . '
  • '; } return apply_filters('mep_display_ticket_in_cart_list', ob_get_clean(), $ticket_type_arr, $eid); } diff --git a/inc/mep_user_custom_style.php b/inc/mep_user_custom_style.php index 20444d5..9ddef96 100644 --- a/inc/mep_user_custom_style.php +++ b/inc/mep_user_custom_style.php @@ -6,16 +6,16 @@ if (!defined('ABSPATH')) { add_action('wp_head', 'mep_user_custom_styles', 10, 999); function mep_user_custom_styles() { - $base_color = mep_get_option('mep_base_color', 'style_setting_sec', '#ffbe30'); - $label_bg_color = mep_get_option('mep_title_bg_color', 'style_setting_sec', '#ffbe30'); - $label_text_color = mep_get_option('mep_title_text_color', 'style_setting_sec', '#ffffff'); - $cart_btn_bg_color = mep_get_option('mep_cart_btn_bg_color', 'style_setting_sec', '#ffbe30'); - $cart_btn_txt_color = mep_get_option('mep_cart_btn_text_color', 'style_setting_sec', '#ffffff'); + $base_color = esc_attr(mep_get_option('mep_base_color', 'style_setting_sec', '#ffbe30')); + $label_bg_color = esc_attr(mep_get_option('mep_title_bg_color', 'style_setting_sec', '#ffbe30')); + $label_text_color = esc_attr(mep_get_option('mep_title_text_color', 'style_setting_sec', '#ffffff')); + $cart_btn_bg_color = esc_attr(mep_get_option('mep_cart_btn_bg_color', 'style_setting_sec', '#ffbe30')); + $cart_btn_txt_color = esc_attr(mep_get_option('mep_cart_btn_text_color', 'style_setting_sec', '#ffffff')); - $calender_btn_bg_color = mep_get_option('mep_calender_btn_bg_color', 'style_setting_sec', '#ffbe30'); - $calender_btn_txt_color = mep_get_option('mep_calender_btn_text_color', 'style_setting_sec', '#ffffff'); - $faq_label_bg_color = mep_get_option('mep_faq_title_bg_color', 'style_setting_sec', '#ffbe30'); - $faq_label_text_color = mep_get_option('mep_faq_title_text_color', 'style_setting_sec', '#ffffff'); + $calender_btn_bg_color = esc_attr(mep_get_option('mep_calender_btn_bg_color', 'style_setting_sec', '#ffbe30')); + $calender_btn_txt_color = esc_attr(mep_get_option('mep_calender_btn_text_color', 'style_setting_sec', '#ffffff')); + $faq_label_bg_color = esc_attr(mep_get_option('mep_faq_title_bg_color', 'style_setting_sec', '#ffbe30')); + $faq_label_text_color = esc_attr(mep_get_option('mep_faq_title_text_color', 'style_setting_sec', '#ffffff')); ?>