diff --git a/demo/cn/asyncData/getNodes.php b/demo/cn/asyncData/getNodes.php index 55c3918afbeea0fd654cccb78a5628929510c330..6d22b5ebd6b46a1a0c5c479eb430cf9249df61ee 100644 --- a/demo/cn/asyncData/getNodes.php +++ b/demo/cn/asyncData/getNodes.php @@ -21,11 +21,9 @@ if ($pLevel==null || $pLevel=="") $pLevel = "0"; if ($pName==null) $pName = ""; else $pName = $pName."."; -$pId = str_replace("%<%", "<", $pId); -$pId = str_replace("%>%", ">", $pId); +$pId = htmlspecialchars($pId); -$pName = str_replace("%<%", "<", $pName); -$pName = str_replace("%>%", ">", $pName); +$pName = htmlspecialchars($pName); //for ($i=1; $i<9999; $i++) { // for ($j=1; $j<999; $j++) { diff --git a/demo/cn/asyncData/getNodesForBigData.php b/demo/cn/asyncData/getNodesForBigData.php index f91098f4bb755c4db65a53af79d31b77e275701d..588c14c5c1c66abf2c6f8e278e1baa9536cc00f9 100644 --- a/demo/cn/asyncData/getNodesForBigData.php +++ b/demo/cn/asyncData/getNodesForBigData.php @@ -11,8 +11,7 @@ if(array_key_exists( 'count',$_REQUEST)) { if ($pId==null || $pId=="") $pId = "0"; if ($pCount==null || $pCount=="") $pCount = "10"; -$pId = str_replace("%<%", "<", $pId); -$pId = str_replace("%>%", ">", $pId); +$pId = htmlspecialchars($pId); $max = (int)$pCount; for ($i=1; $i<=$max; $i++) { @@ -24,4 +23,4 @@ for ($i=1; $i<=$max; $i++) { } } -?>] \ No newline at end of file +?>] diff --git a/demo/en/asyncData/getNodes.php b/demo/en/asyncData/getNodes.php index 55c3918afbeea0fd654cccb78a5628929510c330..6d22b5ebd6b46a1a0c5c479eb430cf9249df61ee 100644 --- a/demo/en/asyncData/getNodes.php +++ b/demo/en/asyncData/getNodes.php @@ -21,11 +21,9 @@ if ($pLevel==null || $pLevel=="") $pLevel = "0"; if ($pName==null) $pName = ""; else $pName = $pName."."; -$pId = str_replace("%<%", "<", $pId); -$pId = str_replace("%>%", ">", $pId); +$pId = htmlspecialchars($pId); -$pName = str_replace("%<%", "<", $pName); -$pName = str_replace("%>%", ">", $pName); +$pName = htmlspecialchars($pName); //for ($i=1; $i<9999; $i++) { // for ($j=1; $j<999; $j++) { diff --git a/demo/en/asyncData/getNodesForBigData.php b/demo/en/asyncData/getNodesForBigData.php index f91098f4bb755c4db65a53af79d31b77e275701d..588c14c5c1c66abf2c6f8e278e1baa9536cc00f9 100644 --- a/demo/en/asyncData/getNodesForBigData.php +++ b/demo/en/asyncData/getNodesForBigData.php @@ -11,8 +11,7 @@ if(array_key_exists( 'count',$_REQUEST)) { if ($pId==null || $pId=="") $pId = "0"; if ($pCount==null || $pCount=="") $pCount = "10"; -$pId = str_replace("%<%", "<", $pId); -$pId = str_replace("%>%", ">", $pId); +$pId = htmlspecialchars($pId); $max = (int)$pCount; for ($i=1; $i<=$max; $i++) { @@ -24,4 +23,4 @@ for ($i=1; $i<=$max; $i++) { } } -?>] \ No newline at end of file +?>]