Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpdt_escape_js($unsafe){
- if(function_exists('json_encode')){ //php 4.
- return json_encode($unsafe);
- }
- return str_replace('/', '/', htmlspecialchars($unsafe, ENT_QUOTES, 'UTF-8')); //escape &<>"' and /
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement