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