escape html characters in web console output
This commit is contained in:
parent
d462892467
commit
3ad4aa2196
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
response.map(r => r.response).forEach(item => {
|
response.map(r => r.response).forEach(item => {
|
||||||
$('#console_command_response').append(`<div>${item}</div>`);
|
$('#console_command_response').append(`<div>${escapeHtml(item)}</div>`);
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#console_command_response').append('<hr/>')
|
$('#console_command_response').append('<hr/>')
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
if (response.status < 500) {
|
if (response.status < 500) {
|
||||||
response.responseJSON.map(r => r.response).forEach(item => {
|
response.responseJSON.map(r => r.response).forEach(item => {
|
||||||
$('#console_command_response').append(`<div class="text-danger">${item}</div>`);
|
$('#console_command_response').append(`<div class="text-danger">${escapeHtml(item)}</div>`);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
$('#console_command_response').append(`<div class="text-danger">Could not execute command...</div>`);
|
$('#console_command_response').append(`<div class="text-danger">Could not execute command...</div>`);
|
||||||
|
Loading…
Reference in New Issue
Block a user