2014-01-17, 20:24:04
Hi all,
Do you have global functions or templates tags
to clean values prior echoing ?
i'm used to the WP esc_html/esc_js and i'm looking for GS equivalents to:
Escapes single quotes, htmlspecialchar " < > &, and fix line endings. Escapes text strings for echoing in HTML alt="" or title="" or for echoing in JS, i.e. intended to be used for inline JS (in a tag attribute, for example onclick="…" or alert()/confirm()).
Thanks in advance for your help
Do you have global functions or templates tags
to clean values prior echoing ?
i'm used to the WP esc_html/esc_js and i'm looking for GS equivalents to:
PHP Code:
esc_html ( $string ); // intended to be used in HTML alt="" or title=""
esc_js ( $string ); // for echos in JS alert()/confirm()
Escapes single quotes, htmlspecialchar " < > &, and fix line endings. Escapes text strings for echoing in HTML alt="" or title="" or for echoing in JS, i.e. intended to be used for inline JS (in a tag attribute, for example onclick="…" or alert()/confirm()).
Thanks in advance for your help