This commit is contained in:
Jiiks 2016-12-02 11:28:41 +02:00
parent 520ca3faea
commit fec2679fc8
2 changed files with 4 additions and 4 deletions

View File

@ -996,7 +996,7 @@ PublicServers.prototype.loadServers = function(dataset, search, clear) {
var source = hit._source;
if(source.invite_code === undefined) return;
var icode = source.invite_code.replace(/ /g,'');
icode = self.escape(icode);
icode = self.escape(icode).replace(/[^a-z0-9]/g,'');
var html = '<div class="server-row">';
html += '<div class="server-icon" style="background-image:url(' + self.escape(source.icon) + ')"></div>';
html += '<div class="server-info server-name">';
@ -1026,7 +1026,7 @@ PublicServers.prototype.loadServers = function(dataset, search, clear) {
html += '<span>' + source.region + '</span>';
html += '</div>';
html += '<div class="server-info">';
html += '<button data-server-invite-code='+icode.replace(/[^a-z0-9]/g,'')+'>Join</button>';
html += '<button data-server-invite-code='+icode+'>Join</button>';
html += '</div>';
html += '</div>';
$("#pubs-list").append(html);

4
js/main.min.js vendored

File diff suppressed because one or more lines are too long