Escape special characters in credits (#5064)
This commit is contained in:
parent
e2b5ee1364
commit
3a94dc98c4
1 changed files with 6 additions and 1 deletions
|
@ -58,7 +58,12 @@ github.repos.getForOrg({
|
|||
cb(err);
|
||||
return;
|
||||
}
|
||||
if(userInfo.login == 'RubenKelevra') userInfo.name = 'RubenKelevra'; // ugh, because his name is `@RubenKelevra`
|
||||
if (userInfo.name) {
|
||||
userInfo.name = userInfo.name.replace(/^@/, '')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/[\\`*_{}[\]()#+-.!~|]/g, '\\$&');
|
||||
}
|
||||
usersMap[login].info.name = userInfo.name || userInfo.login;
|
||||
usersMap[login].info.username = userInfo.login;
|
||||
cb();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue