Entity encode a string and don’t double encode it if already encoded
Usage
// basic usage
$string = $sanitizer->entities1(string $str);
// usage with all arguments
$string = $sanitizer->entities1(string $str, $flags = 3, string $encoding = 'UTF-8');
Arguments
Name | Type(s) | Description |
---|---|---|
str | string | String to entity encode |
flags (optional) | int, bool | See PHP htmlentities() function for flags. |
encoding (optional) | string | Encoding of string (default="UTF-8"). |
Return value
string
Entity encoded string
See Also
$sanitizer methods and properties
API reference based on ProcessWire core version 3.0.236