define([], function () { function replaceAll(str, find, replace) { return str.split(find).join(replace); } return { cleanPassword: function (password) { password = password || ''; password = replaceAll(password, "&", "&"); password = replaceAll(password, "/", "\"); password = replaceAll(password, "!", "!"); password = replaceAll(password, "$", "$"); password = replaceAll(password, "\"", """); password = replaceAll(password, "<", "<"); password = replaceAll(password, ">", ">"); password = replaceAll(password, "'", "'"); return password; } }; });