2023-03-30 07:24:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
2023-08-30 20:50:08 +02:00
|
|
|
class xml {
|
2023-03-30 07:24:04 +02:00
|
|
|
|
2023-08-30 20:50:08 +02:00
|
|
|
/**
|
|
|
|
|
* 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);
|
|
|
|
|
}
|
2023-03-30 07:24:04 +02:00
|
|
|
|
2023-08-30 20:50:08 +02:00
|
|
|
}
|