Advertisement
rAthus

function protect($var)

Oct 1st, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.13 KB | None | 0 0
  1. function protect($var)
  2. {
  3.     return htmlspecialchars(((mb_detect_encoding($var)=='UTF-8')?$var:utf8_encode($var)),ENT_QUOTES);
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement