mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
34 lines
924 B
JavaScript
34 lines
924 B
JavaScript
(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); |