updating params to htmlspecialchars, forcing utf-8 encoding