diff --git a/js/jquery.jsonview.js b/js/jquery.jsonview.js index a9be3c7..40c4239 100644 --- a/js/jquery.jsonview.js +++ b/js/jquery.jsonview.js @@ -15,7 +15,11 @@ https://github.com/yesmeck/jquery-jsonview JSONFormatter.prototype.htmlEncode = function(html) { if (html !== null) { - return html.toString().replace(/&/g, "&").replace(/"/g, """).replace(//g, ">"); + var htmlEncoded = html.toString().replace(/&/g, "&").replace(/"/g, """).replace(//g, ">"); + + htmlEncoded = htmlEncoded.replace("[RED]", "").replace("[/RED]", ""); + + return htmlEncoded; } else { return ''; } diff --git a/plugin.php b/plugin.php index 9e02ef8..70a858f 100644 --- a/plugin.php +++ b/plugin.php @@ -4,7 +4,7 @@ * Plugin Name: DustPress Debugger * Plugin URI: https://github.com/devgeniem/dustpress-debugger * Description: Provides handy ajaxified debugger tool for DustPress based themes. - * Version: 1.5.5 + * Version: 1.6.0 * Author: Geniem Oy / Miika Arponen & Ville Siltala * Author URI: http://www.geniem.com */ @@ -47,11 +47,11 @@ public static function init() { ) ) { // Register the debugger script - wp_register_script('dustpress_debugger', plugin_dir_url(__FILE__) . 'js/dustpress-debugger.js', ['jquery'], '1.5.2', true); + wp_register_script('dustpress_debugger', plugin_dir_url(__FILE__) . 'js/dustpress-debugger.js', ['jquery'], '1.6.0', true); // JsonView jQuery plugin wp_enqueue_style('jquery.jsonview', plugin_dir_url(__FILE__) . 'css/jquery.jsonview.css', null, null, null); - wp_enqueue_script('jquery.jsonview', plugin_dir_url(__FILE__) . 'js/jquery.jsonview.js', ['jquery'], null, true); + wp_enqueue_script('jquery.jsonview', plugin_dir_url(__FILE__) . 'js/jquery.jsonview.js', ['jquery'], '1.6.0', true); // Register debugger ajax hook add_action('wp_ajax_dustpress_debugger', array(__CLASS__, 'get_debugger_data'));