Undefined check for unsafes

This commit is contained in:
Jiiks 2016-12-02 09:20:53 +02:00
parent aa4877d851
commit 9bddcaa181
2 changed files with 2 additions and 0 deletions

View File

@ -1134,6 +1134,7 @@ PublicServers.prototype.joinServer = function (code) {
};
PublicServers.prototype.escape = function(unsafe) {
if(unsafe === undefined) return "";
return unsafe
.replace(/&/g, "&")
.replace(/</g, "&lt;")

1
js/main.min.js vendored
View File

@ -1134,6 +1134,7 @@ PublicServers.prototype.joinServer = function (code) {
};
PublicServers.prototype.escape = function(unsafe) {
if(unsafe === undefined) return "";
return unsafe
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")