From 6f93dd2a9a2d48724b296a4b60bbd74b7367f7e4 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Fri, 30 Mar 2018 21:26:56 +0900 Subject: [PATCH] refs #160 Remove html tags in reply notification --- src/renderer/store/TimelineSpace.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/TimelineSpace.js b/src/renderer/store/TimelineSpace.js index 0b2b93c7..dd7efcb8 100644 --- a/src/renderer/store/TimelineSpace.js +++ b/src/renderer/store/TimelineSpace.js @@ -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', {