cdata suport on jdata()
authorAlan <alan@roojs.com>
Thu, 17 Nov 2022 09:36:26 +0000 (17:36 +0800)
committerAlan <alan@roojs.com>
Thu, 17 Nov 2022 09:36:26 +0000 (17:36 +0800)
Pman.php

index f8f9ab5..c8a4ecb 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -605,7 +605,7 @@ class Pman extends HTML_FlexyFramework_Page
         
         if ($retHTML) {
             header('Content-type: text/html');
         
         if ($retHTML) {
             header('Content-type: text/html');
-            echo "<HTML><HEAD></HEAD><BODY>";
+            echo "<HTML><HEAD></HEAD><BODY><";
             // encode html characters so they can be read..
             echo  str_replace(array('<','>'), array('\u003c','\u003e'),
                         $this->jsencode(array('success'=> true, 'data' => $str), false));
             // 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');
         if ($retHTML) {
             
             header('Content-type: text/html');
-            echo "<HTML><HEAD></HEAD><BODY>";
+            echo "<HTML><HEAD></HEAD><BODY><![CDATA[";
             // encode html characters so they can be read..
             echo  str_replace(array('<','>'), array('\u003c','\u003e'),
                         $this->jsencode(array('success' =>  true, 'total'=> $total, 'data' => $ar) + $extra, false));
             // encode html characters so they can be read..
             echo  str_replace(array('<','>'), array('\u003c','\u003e'),
                         $this->jsencode(array('success' =>  true, 'total'=> $total, 'data' => $ar) + $extra, false));
-            echo "</BODY></HTML>";
+            echo "]]></BODY></HTML>";
             exit;
         }
         
             exit;
         }