From 41d9f18608559cae8e27d22f9acf9e6216ef0ef9 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 22 Jun 2020 22:45:34 +0100 Subject: [PATCH] Daemon node - catch tiny possible escape with "\n " in command as label --- utility/daemon/daemon.html | 2 +- utility/daemon/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utility/daemon/daemon.html b/utility/daemon/daemon.html index 2d0afb48..8b89688c 100644 --- a/utility/daemon/daemon.html +++ b/utility/daemon/daemon.html @@ -79,7 +79,7 @@ outputLabels: ["stdout","stderr","exit code"], icon: "arrow-in.png", label: function() { - return this.name||this.command||"daemon"; + return this.name||this.command.replace(/\\n /g,"\\\\n ")||"daemon"; }, labelStyle: function() { return this.name?"node_label_italic":""; diff --git a/utility/daemon/package.json b/utility/daemon/package.json index 3934a37b..308023c4 100644 --- a/utility/daemon/package.json +++ b/utility/daemon/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-daemon", - "version" : "0.1.0", + "version" : "0.1.2", "description" : "A Node-RED node that runs and monitors a long running system command.", "dependencies" : { },