tec_sanitize_string( string $string )

Sanitizes string values.


Parameters

$string

(string) (Required) The string being sanitized.


Top ↑

Return

(string) $string The sanitized version of the string.


Top ↑

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;
}

Top ↑

Changelog

Changelog
Version Description
5.0.17 Introduced.