Sanitizes a URL for database or redirect usage.
Description
This function is an alias for sanitize_url() .
See also
Parameters
$urlstringrequired- The URL to be cleaned.
$protocolsstring[]optional- An array of acceptable protocols.
Defaults to return value of wp_allowed_protocols() .Default:
null
Source
function esc_url_raw( $url, $protocols = null ) { return sanitize_url( $url, $protocols ); } Changelog
| Version | Description |
|---|---|
| 6.1.0 | Turned into an alias for sanitize_url() . |
| 2.8.0 | Introduced. |
Right and Wrong usage