This commit is contained in:
Jiiks 2016-12-02 11:27:48 +02:00
parent c8e906b00d
commit 520ca3faea
2 changed files with 3 additions and 2 deletions

View File

@ -1026,7 +1026,7 @@ PublicServers.prototype.loadServers = function(dataset, search, clear) {
html += '<span>' + source.region + '</span>'; html += '<span>' + source.region + '</span>';
html += '</div>'; html += '</div>';
html += '<div class="server-info">'; html += '<div class="server-info">';
html += '<button data-server-invite-code='+icode+'>Join</button>'; html += '<button data-server-invite-code='+icode.replace(/[^a-z0-9]/g,'')+'>Join</button>';
html += '</div>'; html += '</div>';
html += '</div>'; html += '</div>';
$("#pubs-list").append(html); $("#pubs-list").append(html);
@ -1135,6 +1135,7 @@ PublicServers.prototype.joinServer = function (code) {
PublicServers.prototype.escape = function(unsafe) { PublicServers.prototype.escape = function(unsafe) {
if(unsafe === undefined) return ""; if(unsafe === undefined) return "";
return unsafe return unsafe
.replace(/&/g, "&amp;") .replace(/&/g, "&amp;")
.replace(/</g, "&lt;") .replace(/</g, "&lt;")

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long