mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #415) Fix bug
This commit is contained in:
@@ -99,7 +99,7 @@ $(function(){
|
||||
$('#label-assigned').html($('<span>')
|
||||
.append($('<a class="username strong">').attr('href', '@path/' + userName).text(userName))
|
||||
.append(' will be assigned'));
|
||||
$('a.assign[data-name=' + userName + '] i').attr('class', 'icon-ok');
|
||||
$('a.assign[data-name=' + jqSelectorEscape(userName) + '] i').attr('class', 'icon-ok');
|
||||
}
|
||||
$('input[name=assignedUserName]').val(userName);
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ $(function(){
|
||||
.append($this.find('img.avatar').clone(false)).append(' ')
|
||||
.append($('<a class="username strong">').attr('href', '@path/' + userName).text(userName))
|
||||
.append(' is assigned');
|
||||
$('a.assign[data-name=' + userName + '] i').attr('class', 'icon-ok');
|
||||
$('a.assign[data-name=' + jqSelectorEscape(userName) + '] i').attr('class', 'icon-ok');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -103,3 +103,7 @@ function diffUsingJS(oldTextId, newTextId, outputId) {
|
||||
viewType: 1
|
||||
}));
|
||||
}
|
||||
|
||||
function jqSelectorEscape(val) {
|
||||
return val.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~]/g, '\\$&');
|
||||
}
|
||||
Reference in New Issue
Block a user