Documentation, format class, no modification. (#7629)

This commit is contained in:
frytimo
2025-11-19 12:48:36 -04:00
committed by GitHub
parent 0ea256fce8
commit 34821bed7e
36 changed files with 12982 additions and 11551 deletions

View File

@@ -1,18 +1,20 @@
<?php
/**
* xml class
*/
class xml {
/**
* xml class
* Sanitizes a string by removing any PHP-style placeholders and encoding special characters.
*
* @param string $string The input string to be sanitized.
*
* @return string The sanitized string with special characters encoded.
*/
class xml {
/**
* Escapes xml special characters to html entities and sanitze switch special chars.
* @param mixed $string
* @return void
*/
static function sanitize($string) {
$string = preg_replace('/\$\{[^}]+\}/', '', $string);
return htmlspecialchars($string, ENT_XML1);
}
static function sanitize($string) {
$string = preg_replace('/\$\{[^}]+\}/', '', $string);
return htmlspecialchars($string, ENT_XML1);
}
}