2009-03-12 Evi Vanoost <vanooste@rcbi.rochester.edu>

* include/functions.php: Added safe_output_xml which makes variables
	clean for output converting html entities into numeric entities understood
	by all XML validators - fixed small mistake
	
	* operation/events/events_rss.php: Used safe_output_xml where needed.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1532 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
guruevi 2009-03-12 20:17:56 +00:00
parent a0092ef384
commit 64a956975b
1 changed files with 6 additions and 6 deletions

View File

@ -58,12 +58,12 @@ function safe_input ($value) {
* @return mixed The cleaned string or array.
*/
function safe_output_xml ($string) {
if (is_numeric ($value))
return $value;
if (is_numeric ($string))
return $string;
if (is_array ($value)) {
array_walk ($value, 'safe_output_xml');
return $value;
if (is_array ($string)) {
array_walk ($string, 'safe_output_xml');
return $string;
}
static $table;
@ -82,7 +82,7 @@ function safe_output_xml ($string) {
//now perform a replacement using preg_replace
//each matched value in $table will be replaced with the corresponding value in $replace
return preg_replace ($table, $replace, $value);
return preg_replace ($table, $replace, $string);
}
/**