From 48eeb826b9e948b3f8fa47d7084d284702d219af Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 31 May 2021 17:35:45 +0600 Subject: [PATCH 1/6] working in checkbox for table and not completed yet although --- includes/items/check.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/includes/items/check.php b/includes/items/check.php index e8a6f77e..bde49e74 100644 --- a/includes/items/check.php +++ b/includes/items/check.php @@ -23,5 +23,23 @@ . ( $checkbox == 'wpt_checked_table' && $enable_disable == 'enabled' ? " checked='checked'" : "" ) . ">" . ""; -echo wp_kses_post( $wpt_single_check ); + +$allowed_atts = array( + 'value' => array(), + 'type' => array(), + 'class' => array(), + 'data-product_id' => array(), + 'data-temp_number' => array(), + 'id' => array(), + 'data-product_type' => array(), + 'for' => array(), +); + +$allowed_tags['input'] = $allowed_atts; +$allowed_tags['label'] = $allowed_atts; +$allowed_tags['div'] = $allowed_atts; +//var_dump($allowed_tags); +echo $wpt_single_check;//wp_kses( $wpt_single_check, $allowed_tags ); ?> + + \ No newline at end of file From d566d29dd877d72b5dc9f543422f0ac7835ec6b3 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 31 May 2021 17:48:09 +0600 Subject: [PATCH 2/6] working in checkbox for table and not completed yet although --- includes/items/check.php | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/includes/items/check.php b/includes/items/check.php index bde49e74..d57ffc89 100644 --- a/includes/items/check.php +++ b/includes/items/check.php @@ -25,21 +25,32 @@ . ""; $allowed_atts = array( - 'value' => array(), - 'type' => array(), - 'class' => array(), - 'data-product_id' => array(), - 'data-temp_number' => array(), - 'id' => array(), - 'data-product_type' => array(), - 'for' => array(), + 'value' => true, + 'type' => true, + 'class' => true, + 'data-product_id' => true, + 'data-temp_number' => true, + 'id' => true, + 'data-product_type' => true, + 'for' => true, ); $allowed_tags['input'] = $allowed_atts; -$allowed_tags['label'] = $allowed_atts; -$allowed_tags['div'] = $allowed_atts; +//$allowed_tags['label'] = $allowed_atts; +//$allowed_tags['div'] = $allowed_atts; //var_dump($allowed_tags); -echo $wpt_single_check;//wp_kses( $wpt_single_check, $allowed_tags ); ?> +echo $wpt_single_check;// +// +//$allowed_html = array( +// 'a' => array( +// 'href' => array(), +// ), +// 'br' => array(), +//); +//var_dump($wpt_single_check); +//echo wp_kses( $wpt_single_check, $allowed_tags ); +//echo wp_kses( $wpt_single_check, $allowed_tags ); +//var_dump(wp_kses_allowed_html()); ?> \ No newline at end of file From 4ba9cbb44965168a88aca43639407a11dfacf360 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 31 May 2021 18:12:34 +0600 Subject: [PATCH 3/6] add to quote escapping properly --- includes/items/quoterequest.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/includes/items/quoterequest.php b/includes/items/quoterequest.php index 9fb45ad7..4104dbf8 100644 --- a/includes/items/quoterequest.php +++ b/includes/items/quoterequest.php @@ -7,4 +7,18 @@ } $Add_to_Quote = $config_value['yith_add_to_quote_text'];//'Add to Quote'; $data_message = '{"text":"'. $Add_to_Quote .'","adding":"' . $config_value['yith_add_to_quote_adding'] . '","added":"' . $config_value['yith_add_to_quote_added'] . '"}'; -echo "{$Add_to_Quote}"; \ No newline at end of file +?> +' + data-response_msg='' + data-msg='' + data-wp_nonce='' + data-quote_data='' + data-variation='' + data-variation_id='' + data-product_id='' + class='' + href='#' + data-quantity='' + data-selector=''> + + \ No newline at end of file From eaa57047cd5d263ce369cbae4830b1401a09835b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 31 May 2021 18:33:30 +0600 Subject: [PATCH 4/6] working on checkbox with clear escapping. actually do it using html markup --- includes/items/check.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/includes/items/check.php b/includes/items/check.php index d57ffc89..14bd62df 100644 --- a/includes/items/check.php +++ b/includes/items/check.php @@ -9,7 +9,7 @@ "wpt_inside_check_{$temp_number}", ); $check_class = implode(" ", $check_class_arr); - +var_dump($checkbox); $wpt_single_check = false; $wpt_single_check .= " array( @@ -51,6 +51,19 @@ //echo wp_kses( $wpt_single_check, $allowed_tags ); //echo wp_kses( $wpt_single_check, $allowed_tags ); //var_dump(wp_kses_allowed_html()); ?> +' + data-temp_number='' + data-product_id='' + class='' + type='checkbox' value='0' + + > + \ No newline at end of file From ebf3fe06162cf20285ae303abcd206e9baa099ca Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 1 Jun 2021 10:07:25 +0600 Subject: [PATCH 5/6] Stable tag updated --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 8bd7c2c4..26697bf7 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://codecanyon.net/item/woo-product-table-pro/20676867?ref=Code Tags: wc product table,woocommerce product table, product table, wc table, quick order table, wholesale table, restaurants table Requires at least: 4.0.0 Tested up to: 5.7.2 -Stable tag: 2.8.9 +Stable tag: 2.9.0 Requires PHP: 5.6 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From e6c3f1a489510e102b48bf6dcf3291bb2ef1172b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 1 Jun 2021 10:36:47 +0600 Subject: [PATCH 6/6] comment code and vardump removed from includes/check.php file --- includes/items/check.php | 42 +--------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/includes/items/check.php b/includes/items/check.php index 14bd62df..7d02b22c 100644 --- a/includes/items/check.php +++ b/includes/items/check.php @@ -9,48 +9,8 @@ "wpt_inside_check_{$temp_number}", ); $check_class = implode(" ", $check_class_arr); -var_dump($checkbox); - -$wpt_single_check = false; -$wpt_single_check .= "" - . ""; - -$allowed_atts = array( - 'value' => true, - 'type' => true, - 'class' => true, - 'data-product_id' => true, - 'data-temp_number' => true, - 'id' => true, - 'data-product_type' => true, - 'for' => true, -); -$allowed_tags['input'] = $allowed_atts; -//$allowed_tags['label'] = $allowed_atts; -//$allowed_tags['div'] = $allowed_atts; -//var_dump($allowed_tags); -//echo $wpt_single_check;// -// -//$allowed_html = array( -// 'a' => array( -// 'href' => array(), -// ), -// 'br' => array(), -//); -//var_dump($wpt_single_check); -//echo wp_kses( $wpt_single_check, $allowed_tags ); -//echo wp_kses( $wpt_single_check, $allowed_tags ); -//var_dump(wp_kses_allowed_html()); ?> +?> '