WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp kses bad protocol once

Description

Sanitizes content from bad protocols and other characters.

This function searches for URL protocols at the beginning of $string, while handling whitespace and HTML entities.

Usage

<?php wp_kses_bad_protocol_once$string$allowed_protocols ?>

Parameters

$string
(string) (required) Content to check for bad protocols
Default: None
$allowed_protocols
(string) (required) Allowed protocols
Default: None

Return Values

(string) 
Sanitized content

Examples

Notes

Change Log

Since: 1.0.0

Source File

wp_kses_bad_protocol_once() is located in wp-includes/kses.php.

Related

See also index of Function Reference and index of Template Tags.