From a9be0691d9efd84cbf5a9f05236caf4df23bcfdb Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 19 May 2012 11:28:46 -0700 Subject: Create an ajax response framework that inserts tags to guard against UTF-7, and create a $.gallery_autocomplete variant of jQuery's autocomplete that expects the first line to be a tag and discards it. More complete fix for #1871. --- modules/gallery/helpers/ajax.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/gallery/helpers/ajax.php (limited to 'modules/gallery/helpers/ajax.php') diff --git a/modules/gallery/helpers/ajax.php b/modules/gallery/helpers/ajax.php new file mode 100644 index 00000000..f01984a9 --- /dev/null +++ b/modules/gallery/helpers/ajax.php @@ -0,0 +1,31 @@ +\n"; + print html::clean($content); + } +} -- cgit v1.2.3 From 648d9a4de8420f0cec037041bb77c39beaa42ac6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 19 May 2012 11:51:10 -0700 Subject: Remove accidental double encoding. --- modules/gallery/helpers/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/ajax.php') diff --git a/modules/gallery/helpers/ajax.php b/modules/gallery/helpers/ajax.php index f01984a9..6d59b6e4 100644 --- a/modules/gallery/helpers/ajax.php +++ b/modules/gallery/helpers/ajax.php @@ -26,6 +26,6 @@ class ajax_Core { static function response($content) { header("Content-Type: text/plain; charset=" . Kohana::CHARSET); print "\n"; - print html::clean($content); + print $content; } } -- cgit v1.2.3