noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 05/14: Task #1044 - Implementation de Test A


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/14: Task #1044 - Implementation de Test Ajout mécanisme test pour ajax
Date: Sun, 16 Nov 2014 14:27:53 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit ea933249c8acdbe43f8d54615068c881ea6b7e67
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 16 15:20:05 2014 +0100

    Task #1044 - Implementation de Test
    Ajout mécanisme test pour ajax
---
 include/function_javascript.php |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/include/function_javascript.php b/include/function_javascript.php
index 081f4ea..9997f7b 100644
--- a/include/function_javascript.php
+++ b/include/function_javascript.php
@@ -2709,12 +2709,13 @@ function unescapebycharacter($str)
         return array($char, 0);
     }
 }
-/*!\brief When data are transfered thanks ajax in a xml document, the xml
+/**
+ * @brief When data are transfered thanks ajax in a xml document, the xml
  * can not contains some character, to escape those characters, we must use 
this
  * function
- *\param $p_xml the xml to escape
- *\return the xml string with the forbidden char escaped
- *\see ajax_card.js ajaxFid
+ address@hidden $p_xml the xml to escape
+ address@hidden the xml string with the forbidden char escaped
+ address@hidden ajax_card.js ajaxFid
  */
 function escape_xml($p_xml)
 {
@@ -2727,6 +2728,24 @@ function escape_xml($p_xml)
     return $xml;
 }
 /**
+ * @brief
+ * replace special char
+ address@hidden $p_xml the xml to escape
+ address@hidden the xml string with the forbidden char escaped
+ address@hidden ajax_card.js ajaxFid
+ address@hidden escape_xml
+ */
+function unescape_xml($p_xml)
+{
+    $xml=$p_xml;
+    $xml=str_replace('&amp;','&',$xml);
+    $xml=str_replace('&lt;','<',$xml);
+    $xml=str_replace('&gt;','>',$xml);
+    $xml=str_replace('&apos;',"'",$xml);
+    $xml=str_replace('&quot;','"',$xml);
+    return $xml;
+}
+/**
  *load all the javascript in once
  */
 function load_all_script()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]