move UrlEncode to work.js