Programming Language PHP
Namespace Elabftw\Services
Class Filter
Method/Function sanitize
Total Examples 2
2 code examples of PHP Elabftw\Services\Filter::sanitize extracted from open source projects
/**
* Check the cookie token
*/
public static function token(string $token): string
{
if (mb_strlen($token) !== self::COOKIE_LENGTH) {
throw new IllegalActionException('Invalid cookie!');
}
return Filter::sanitize($token);
}
public function getExtra(string $key): string
{
return Filter::sanitize((string) $this->extra[$key]);
}