refs #160 Remove html tags in reply notification

This commit is contained in:
AkiraFukushima 2018-03-30 21:26:56 +09:00
parent dd4854c63b
commit 6f93dd2a9a
1 changed files with 2 additions and 1 deletions

View File

@ -227,8 +227,9 @@ function buildNotification (notification) {
body: `${username(notification.account)} is now following you`
})
case 'mention':
// Clean html tags
return new Notification(`${notification.status.account.display_name}`, {
body: `${notification.status.content}`
body: `${notification.status.content.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g, '')}`
})
case 'reblog':
return new Notification('Reblog', {