From 506ca7e958c5b1e752cc11fa86abd62dcb02a0a1 Mon Sep 17 00:00:00 2001 From: Jonathan Cutrell Date: Thu, 30 Jun 2016 17:48:11 -0400 Subject: [PATCH] UTF-8 change (required for json_encode to work properly) This fixes the issue when non utf-8 strings are passed by converting them. Other options may be to use the options param, but that doesn't seem to work as previously documented (as a string-passed all-caps, eg: "CONSTANT") --- pi.json_encode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pi.json_encode.php b/pi.json_encode.php index 97e56a2..7ab93dc 100755 --- a/pi.json_encode.php +++ b/pi.json_encode.php @@ -16,7 +16,7 @@ class Json_encode { public function __construct() { $this->EE =& get_instance(); $options = ($this->EE->TMPL->fetch_param('options')) ? $this->EE->TMPL->fetch_param('options') : 0; - $this->return_data = json_encode($this->EE->TMPL->tagdata, $options); + $this->return_data = json_encode(utf8_encode($this->EE->TMPL->tagdata), $options); } function usage() {