remove cr lf from incoming filename so easier to pass in results from exec node.

and add test
This commit is contained in:
Dave Conway-Jones
2018-09-23 10:36:50 +01:00
parent 51f875c02d
commit fde157ff50
2 changed files with 28 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ module.exports = function(RED) {
var node = this;
this.on("input",function(msg) {
var filename = node.filename || msg.filename || "";
var filename = (node.filename || msg.filename || "").replace(/\t|\r|\n/g,'');
if (!node.filename) {
node.status({fill:"grey",shape:"dot",text:filename});
}