Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global primitives to ESCape strings?
#1
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:
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
Reply


Messages In This Thread
Global primitives to ESCape strings? - by emanwebdev - 2014-01-17, 20:24:04



Users browsing this thread: 1 Guest(s)