KsesProtocols final class
Minn\Support\KsesProtocols · public/minn/src/Minn/Support/KsesProtocols.php · 67 lines
The protocols an address may use, as kses judges them: the site's list (kses_allowed_protocols), and an address with a protocol not on the list taken off it, encoded colons and entity-spelled protocols seen through.
Public
| static | allowed(): array# | The protocols addresses may use (wp_allowed_protocols): the table's list through kses_allowed_protocols, asked again on every call until wp_loaded has run, then kept. @return list<string> | |||
| static | strip(string $content, array|string $protocols): string# | An address with a protocol the list does not allow taken off (wp_kses_bad_protocol): null bytes gone; an http or https address left as written when that protocol is allowed; otherwise the protocol checked again until nothing changes (up to six times), and empty if it never settles.
| |||
| static | stripOnce(string $content, array|string $protocols): string# | One pass of the protocol check (wp_kses_bad_protocol_once): encoded colons decoded; when what comes before the first colon (and holds no "/?") is an allowed protocol it is lower-cased and kept, otherwise taken off; either way what follows is trimmed.
|
Nothing matches.