From: Alan Date: Thu, 17 Nov 2022 09:36:26 +0000 (+0800) Subject: cdata suport on jdata() X-Git-Url: http://git.roojs.org/?p=Pman.Base;a=commitdiff_plain;h=4d71c63c216ff9dbe8ead4b6a076dbdc74c275ff cdata suport on jdata() --- diff --git a/Pman.php b/Pman.php index f8f9ab5..c8a4ecb 100644 --- a/Pman.php +++ b/Pman.php @@ -605,7 +605,7 @@ class Pman extends HTML_FlexyFramework_Page if ($retHTML) { header('Content-type: text/html'); - echo ""; + echo "<"; // encode html characters so they can be read.. echo str_replace(array('<','>'), array('\u003c','\u003e'), $this->jsencode(array('success'=> true, 'data' => $str), false)); @@ -649,11 +649,11 @@ class Pman extends HTML_FlexyFramework_Page if ($retHTML) { header('Content-type: text/html'); - echo ""; + echo "'), array('\u003c','\u003e'), $this->jsencode(array('success' => true, 'total'=> $total, 'data' => $ar) + $extra, false)); - echo ""; + echo "]]>"; exit; }