wp_kses_bad_protocol
wp_kses_bad_protocol ( $content, $allowed_protocols )
Parameters:- (string) content Content to filter bad protocols from.
- (string[]) allowed_protocols Array of allowed URL protocols.
Returns:- (string) Filtered content.
Defined at: - Introduced in WordPress: 1.0.0
- Deprecated in WordPress: —
Description
Sanitizes a string and removed disallowed URL protocols.This function removes all non-allowed protocols from the beginning of the
string. It ignores whitespace and the case of the letters, and it does
understand HTML entities. It does its work recursively, so it won't be
fooled by a string like `javascript:javascript:alert(57)`.