mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
18 lines
304 B
PHP
18 lines
304 B
PHP
<?php
|
|
|
|
if (!class_exists('xml')) {
|
|
class xml {
|
|
|
|
/**
|
|
* Escapes xml special characters to html entities and sanitze switch special chars.
|
|
*/
|
|
static function sanitize($string) {
|
|
$string = preg_replace('/\$\{[^}]+\}/', '', $string);
|
|
return htmlspecialchars($string, ENT_XML1);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
?>
|