fusionpbx/resources/classes/xml.php

14 lines
270 B
PHP
Raw Normal View History

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