wp_kses_bad_protocol [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Sanitize string from bad protocols.
This function removes all non-allowed protocols from the beginning of $string. It ignores whitespace and the case of the letters, and it does understand HTML entities. It does its work in a while loop, so it won't be fooled by a string like "javascript:javascript:alert(57)".
Source
<?php
function wp_kses_bad_protocol($string, $allowed_protocols) {
$string = wp_kses_no_null($string);
$iterations = 0;
do {
$original_string = $string;
$string = wp_kses_bad_protocol_once($string, $allowed_protocols);
} while ( $original_string != $string && ++$iterations < 6 );
if ( $original_string != $string )
return '';
return $string;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp kses bad protocol « WordPress Codex
Description. Sanitize string from bad protocols. This function removes all non- allowed protocols from the beginning of $string. It ignores whitespace and the case ...
codex.wordpress.org - Call to undefined function wp_kses_bad_protocol() - WordPress
Call to undefined function wp_kses_bad_protocol() (1 post). hm2k. Member Posted 3 years ago #. I went through the install process, everything is fine.
wordpress.org - Function Reference/wp kses bad protocol once2 « WordPress Codex
Codex tools: Log in. Function Reference/wp kses bad protocol once2 ... from "http ://codex.wordpress.org/Function_Reference/wp_kses_bad_protocol_once2" ...
codex.wordpress.org - Docs for page kses.php
string wp_kses_bad_protocol (string $string, array $allowed_protocols). string $ string: Content to filter bad protocols from; array $allowed_protocols: Allowed ...
phpdoc.ftwr.co.uk