Skip to content

Commit c9c35fd

Browse files
committed
Fix issue with grbl FW which has <and >
in response
1 parent b48b18c commit c9c35fd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

index.html.gz

33 Bytes
Binary file not shown.

www/js/commands.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ function Monitor_output_Update(message){
6262
for (var i = 0; i < Monitor_outputLength; i++) {
6363
if (istempfilter && Monitor_output[i].match(regex)) continue;
6464
if ((Monitor_output[i].trim()==="\n") || (Monitor_output[i].trim()==="\r") || (Monitor_output[i].trim()==="\r\n") || (Monitor_output[i].trim()==="") )continue;
65-
else output += Monitor_output[i];
65+
else {
66+
m = Monitor_output[i].replace("&", "&amp;");
67+
m = m.replace("<", "&lt;");
68+
m = m.replace(">", "&gt;");
69+
output += m ;
70+
}
6671
}
6772
document.getElementById("cmd_content").innerHTML = output;
6873
Monitor_check_autoscroll();

0 commit comments

Comments
 (0)