From 028382aab37ddbae69ae2ec85e0379a857d6e0dd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 13 Aug 2020 15:38:12 +0200 Subject: [PATCH] Strip ANSI sequences from notifications text --- components/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/app.js b/components/app.js index d8aa5a8..307c1f7 100644 --- a/components/app.js +++ b/components/app.js @@ -8,6 +8,7 @@ import Connect from "/components/connect.js"; import Composer from "/components/composer.js"; import ScrollManager from "/components/scroll-manager.js"; import { html, Component, createRef } from "/lib/index.js"; +import { strip as stripANSI } from "/lib/ansi.js"; import { SERVER_BUFFER, BufferType, ReceiptType, Status, Unread } from "/state.js"; import commands from "/commands.js"; import { setup as setupKeybindings } from "/keybindings.js"; @@ -309,7 +310,7 @@ export default class App extends Component { title += " in " + target; } var notif = new Notification(title, { - body: text, + body: stripANSI(text), requireInteraction: true, }); notif.addEventListener("click", () => {