From 6c7f6adf9b1379da13e919ef56bf196f209ee295 Mon Sep 17 00:00:00 2001 From: secretr Date: Tue, 23 Oct 2012 10:42:43 +0000 Subject: [PATCH] handle secured json response (jQuery environment) --- e107_files/jslib/core/all.jquery.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107_files/jslib/core/all.jquery.js b/e107_files/jslib/core/all.jquery.js index c051bd477..085db3a83 100644 --- a/e107_files/jslib/core/all.jquery.js +++ b/e107_files/jslib/core/all.jquery.js @@ -1,6 +1,13 @@ +// handle secured json string - the Prototype implementation +$.ajaxSetup({ + dataFilter: function(data, type) { + if(type != 'json') return data; + return data.replace(/^\/\*-secure-([\s\S]*)\*\/\s*$/, '$1'); + } +}); + $(document).ready(function() { - $(".e-hideme").hide(); $(".e-expandit").show();