tec_sanitize_string( string $string )
Sanitizes string values.
Contents
Parameters
- $string
-
(string) (Required) The string being sanitized.
Return
(string) $string The sanitized version of the string.
Source
File: src/functions/utils.php
function tec_sanitize_string( $string ) {
// Replace HTML tags and entities with their plain text equivalents
$string = htmlspecialchars_decode( $string, ENT_QUOTES );
// Remove any remaining HTML tags
$string = strip_tags( $string );
return $string;
}
Changelog
| Version | Description |
|---|---|
| 5.0.17 | Introduced. |