Skip to content

Commit

Permalink
[node-red-node-ui-table] single-quote issue node-red#66
Browse files Browse the repository at this point in the history
  • Loading branch information
wipfl committed Jun 3, 2021
1 parent 3fffb30 commit bf861fa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion node-red-node-ui-table/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<style>.nr-dashboard-ui_table { padding:0; }</style>
Expand Down

0 comments on commit bf861fa

Please sign in to comment.