parent
e4ab676572
commit
ea933249c8
1 changed files with 23 additions and 4 deletions
|
|
@ -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
|
||||
*@param $p_xml the xml to escape
|
||||
*@return the xml string with the forbidden char escaped
|
||||
*@see ajax_card.js ajaxFid
|
||||
*/
|
||||
function escape_xml($p_xml)
|
||||
{
|
||||
|
|
@ -2726,6 +2727,24 @@ function escape_xml($p_xml)
|
|||
$xml=str_replace('"','"',$xml);
|
||||
return $xml;
|
||||
}
|
||||
/**
|
||||
* @brief
|
||||
* replace special char
|
||||
*@param $p_xml the xml to escape
|
||||
*@return the xml string with the forbidden char escaped
|
||||
*@see ajax_card.js ajaxFid
|
||||
*@see escape_xml
|
||||
*/
|
||||
function unescape_xml($p_xml)
|
||||
{
|
||||
$xml=$p_xml;
|
||||
$xml=str_replace('&','&',$xml);
|
||||
$xml=str_replace('<','<',$xml);
|
||||
$xml=str_replace('>','>',$xml);
|
||||
$xml=str_replace(''',"'",$xml);
|
||||
$xml=str_replace('"','"',$xml);
|
||||
return $xml;
|
||||
}
|
||||
/**
|
||||
*load all the javascript in once
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue