mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
84a0e8ceff
commit
f80c41058c
@ -400,7 +400,7 @@
|
|||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
onclick: function() {
|
onclick: function() {
|
||||||
var label = (this.name||this.payload).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
var label = (this.name||this.payload).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
|
||||||
d3.xhr("inject/"+this.id).post(function(err,resp) {
|
d3.xhr("inject/"+this.id).post(function(err,resp) {
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err.status == 404) {
|
if (err.status == 404) {
|
||||||
|
@ -150,9 +150,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
var name = (o.name?o.name:o.id).toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
var name = (o.name?o.name:o.id).toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
|
||||||
var topic = (o.topic||"").toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
var topic = (o.topic||"").toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
|
||||||
var payload = (o.msg||"").toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
var payload = (o.msg||"").toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
|
||||||
msg.className = 'debug-message'+(o.level?(' debug-message-level-'+o.level):'')
|
msg.className = 'debug-message'+(o.level?(' debug-message-level-'+o.level):'')
|
||||||
msg.innerHTML = '<span class="debug-message-date">'+getTimestamp()+'</span>'+
|
msg.innerHTML = '<span class="debug-message-date">'+getTimestamp()+'</span>'+
|
||||||
'<span class="debug-message-name">['+name+']</span>'+
|
'<span class="debug-message-name">['+name+']</span>'+
|
||||||
|
Loading…
Reference in New Issue
Block a user