Свойство | Тип | Описание | |
---|---|---|---|
$evil | string[] | The evil attributes. | |
$xssHash | string | A random hash for protecting urls. |
Метод | Описание | |
---|---|---|
__construct ( array $evil = null ) | Create a new security instance. | |
clean ( string | string[] $str ) : string | XSS clean. |
Метод | Описание | |
---|---|---|
compactExplodedWords ( array $matches ) : string | Compact exploded words. | |
convertAttribute ( array $match ) : string | Attribute conversion. | |
decodeEntity ( array $match ) : string | HTML entity decode callback. | |
doNeverAllowed ( string $str ) : string | Do never allowed. | |
entityDecode ( string $str ) : string | HTML entities decode. | |
filterAttributes ( string $str ) : string | Attribute filtering. | |
jsImgRemoval ( array $match ) : string | JS image removal. | |
jsLinkRemoval ( array $match ) : string | JS link removal. | |
process ( string $str ) : string | Process a string for cleaning. | |
removeEvilAttributes ( string $str ) : string | Remove evil html attributes. | |
removeInvisibleCharacters ( string $str, boolean $urlEncoded = true ) : string | Removes invisible characters. | |
sanitizeNaughtyHtml ( array $matches ) : string | Sanitize naughty html. | |
xssHash ( ) : string | Generates the XSS hash if needed and returns it. |
public __construct ( array $evil = null ) | ||
$evil | array |
protected compactExplodedWords ( array $matches ) : string | ||
$matches | array | |
Результат | string |
protected convertAttribute ( array $match ) : string | ||
$match | array | |
Результат | string |
protected decodeEntity ( array $match ) : string | ||
$match | array | |
Результат | string |
protected doNeverAllowed ( string $str ) : string | ||
$str | string | |
Результат | string |
protected entityDecode ( string $str ) : string | ||
$str | string | |
Результат | string |
protected filterAttributes ( string $str ) : string | ||
$str | string | |
Результат | string |
protected jsImgRemoval ( array $match ) : string | ||
$match | array | |
Результат | string |
protected jsLinkRemoval ( array $match ) : string | ||
$match | array | |
Результат | string |
protected removeEvilAttributes ( string $str ) : string | ||
$str | string | |
Результат | string |
protected sanitizeNaughtyHtml ( array $matches ) : string | ||
$matches | array | |
Результат | string |
protected string $xssHash | ||
Результат | string |