public static function getString($name, $default = null) { if (isset($_GET[$name]) && $_GET[$name] !== '') { return trim(htmlspecialchars($_GET[$name], ENT_QUOTES, 'UTF-8')); } return $default; }