sw.js: Fix display of RT line in push notifications
This commit is contained in:
parent
91fe4f4306
commit
309981a294
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ const formatMessage = (messageId, locale, values = {}) =>
|
|||
(new IntlMessageFormat(locales[locale][messageId], locale)).format(values);
|
||||
|
||||
const htmlToPlainText = html =>
|
||||
unescape(html.replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n').replace(/<[^>]*>/g, ''));
|
||||
unescape(html.replace(/<br\s*\/?>/g, '\n').replace(/<\/p><[^>]*>/g, '\n\n').replace(/<[^>]*>/g, ''));
|
||||
|
||||
const handlePush = (event) => {
|
||||
const { access_token, notification_id, preferred_locale, title, body, icon } = event.data.json();
|
||||
|
|
Loading…
Reference in a new issue