diff --git a/node-red-node-ui-table/node.js b/node-red-node-ui-table/node.js index a3611ba..7fc6780 100644 --- a/node-red-node-ui-table/node.js +++ b/node-red-node-ui-table/node.js @@ -59,7 +59,22 @@ module.exports = function (RED) { } function HTML(config,dark) { - var configAsJson = JSON.stringify(config); + var configAsJson = JSON.stringify(config, (key, value) => { + // exclude the node description + if (key === "info") { + return undefined; + } + + // replace single quotation mark (apostrophe) by html code in strings + if (typeof (value) === "string") { + return value.replace(/'/g, "'"); + } + + // all others leave unchanged + return value; + } + ); + var mid = (dark) ? "_midnight" : ""; var html = String.raw`