浏览代码

FIX JSON.parse not needeed and missing simple quote escaping

Regis Houssin 6 年之前
父节点
当前提交
406f26b9d2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      htdocs/takepos/takepos.php

+ 1 - 1
htdocs/takepos/takepos.php

@@ -58,7 +58,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
 $categorie = new Categorie($db);
 $categories = $categorie->get_full_arbo('product');
 ?>
-var categories = JSON.parse( '<?php echo json_encode($categories);?>' );
+var categories = <?php echo json_encode($categories, JSON_HEX_APOS); ?>;
 var currentcat;
 var pageproducts=0;
 var pagecategories=0;