mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 01:37:23 +00:00
Escape special characters in credits (#5064)
This commit is contained in:
parent
e2b5ee1364
commit
3a94dc98c4
@ -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…
x
Reference in New Issue
Block a user