1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

catch tiny possible escape for "\n " in exec command node label.

This commit is contained in:
Dave Conway-Jones 2020-06-22 22:41:22 +01:00
parent b72ca439e2
commit 5596d2df8e
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -70,7 +70,7 @@
},
icon: "cog.svg",
label: function() {
return this.name||this.command||(this.useSpawn=="true"?this._("exec.spawn"):this._("exec.exec"));
return this.name||this.command.replace(/\\n /g,"\\\\n ")||(this.useSpawn=="true"?this._("exec.spawn"):this._("exec.exec"));
},
labelStyle: function() {
return this.name?"node_label_italic":"";