Merge pull request #162 from h3poteto/iss-160

closes #160 Remove html tags in reply notification
This commit is contained in:
AkiraFukushima 2018-03-30 21:29:15 +09:00 committed by GitHub
commit c05937764e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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', {