No edit summary |
(category added) |
||
Line 13: | Line 13: | ||
<noinclude> | <noinclude> | ||
[[Category:General Utility Functions]] | |||
[[Category:2.0]] | [[Category:2.0]] | ||
[[Category:Customizing SMF]] | [[Category:Customizing SMF]] | ||
[[Category:Developing SMF]]</noinclude> | [[Category:Developing SMF]]</noinclude> |
Revision as of 11:49, 25 August 2012
Usage:
$smcFunc['htmlspecialchars'] (string $str [, int $quote_style = ENT_COMPAT, string $charset = 'ISO-8859-1'])
Description: This function is similar to PHP's htmlspecialchars function, however, it additionally checks the encoding argument and takes care of HTML entities using regex.
Parameters:
- $str - The string that will be converted.
- $quote_style - Bitmask flag on how to handle the string (optional).
- $charset - The character set of the string (optional).
Return: The converted string.
Example:
$result = $smcFunc['htmlspecialchars']('<<<"This is a string that will be converted to HTML entities.">>>');