(function (globalScope) { if (!globalScope.MediaBrowser) { globalScope.MediaBrowser = {}; } function replaceAll(str, find, replace) { return str.split(find).join(replace); } var connectService = { 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; } }; globalScope.MediaBrowser.ConnectService = connectService; })(window);