esc_js

Escape single quotes, htmlspecialchar " &, and fix line endings.

Description

(string) esc_js( (string) $text ); 

Escapes text strings for echoing in JS, both inline (for example in onclick="...") and inside

© 2018 hookr.io (beta) | Privacy | Proudly Powered by WordPress