A WordPress-centric search engine for devs and theme authors



js_escape ›

Since2.0.6
Deprecatedn/a
apply_filters( 'js_escape', $safe_text, $text )
Parameters: (2)
  • (string) $safe_text The text after it has been escaped.
    Required: Yes
  • (string) $text The text prior to being escaped.
    Required: Yes
Defined at:
Codex:

Filters a string cleaned and escaped for output in JavaScript.

Text passed to esc_js() is stripped of invalid or special characters, and properly slashed for output.





Source

return apply_filters( 'js_escape', $safe_text, $text );