Files
fusionpbx/resources/classes/xml.php
FusionPBX 40a7ed7b15 xml sanitize allow $1 and $2
Continue to remove any ${variables}  in this format
2023-08-30 12:50:08 -06:00

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);
}
}
}
?>