From 0de3ef8cf1042114cdd75d54bdec98d1568c1a03 Mon Sep 17 00:00:00 2001 From: doubleswirve <863571+doubleswirve@users.noreply.github.com> Date: Mon, 8 Oct 2018 12:56:19 -0600 Subject: [PATCH] remove js escaping as the output is already json encoded in the amp plugin --- chartbeat.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chartbeat.php b/chartbeat.php index 53fd42c..83ac179 100644 --- a/chartbeat.php +++ b/chartbeat.php @@ -402,16 +402,16 @@ function chartbeat_amp_add_analytics( $analytics ) { 'attributes' => array(), 'config_data' => array( 'vars' => array( - 'uid' => esc_js($cb_configs["uid"]), - 'domain' => esc_js($cb_configs["domain"]), + 'uid' => $cb_configs["uid"], + 'domain' => $cb_configs["domain"], ) ), ); $enable_newsbeat = get_option('chartbeat_enable_newsbeat'); if ($enable_newsbeat) { - $analytics['chartbeat']['config_data']['vars']['authors'] = esc_js($cb_configs['author']); - $analytics['chartbeat']['config_data']['vars']['sections'] = esc_js($cb_configs['sections']); + $analytics['chartbeat']['config_data']['vars']['authors'] = $cb_configs['author']; + $analytics['chartbeat']['config_data']['vars']['sections'] = $cb_configs['sections']; } } return $analytics;