mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-5583-Bug-Comando-de-alerta' into 'develop'
Ent 5583 bug comando de alerta See merge request artica/pandorafms!3108
This commit is contained in:
commit
15f14d8ed2
@ -56,7 +56,19 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
// If is setted a description, we change the carriage return by <br> tags
|
// If is setted a description, we change the carriage return by <br> tags
|
||||||
if (isset($command['description'])) {
|
if (isset($command['description'])) {
|
||||||
$command['description'] = io_safe_input(str_replace("\r\n", '<br>', io_safe_output($command['description'])));
|
$command['description'] = str_replace(
|
||||||
|
[
|
||||||
|
'<',
|
||||||
|
'>',
|
||||||
|
"\r\n",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'<br>',
|
||||||
|
],
|
||||||
|
io_safe_output($command['description'])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Descriptions are stored in json.
|
// Descriptions are stored in json.
|
||||||
@ -431,8 +443,16 @@ foreach ($commands as $command) {
|
|||||||
$data['id'] = $command['id'];
|
$data['id'] = $command['id'];
|
||||||
$data['group'] = ui_print_group_icon($command['id_group'], true);
|
$data['group'] = ui_print_group_icon($command['id_group'], true);
|
||||||
$data['description'] = str_replace(
|
$data['description'] = str_replace(
|
||||||
"\r\n",
|
[
|
||||||
'<br>',
|
'<',
|
||||||
|
'>',
|
||||||
|
"\r\n",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'<br>',
|
||||||
|
],
|
||||||
io_safe_output($command['description'])
|
io_safe_output($command['description'])
|
||||||
);
|
);
|
||||||
$data['action'] = '';
|
$data['action'] = '';
|
||||||
|
@ -305,7 +305,7 @@ $(document).ready (function () {
|
|||||||
var origicommand_descriptionnal_command;
|
var origicommand_descriptionnal_command;
|
||||||
|
|
||||||
if (<?php echo (int) $id_command; ?>) {
|
if (<?php echo (int) $id_command; ?>) {
|
||||||
original_command = "<?php echo addslashes(io_safe_output(alerts_get_alert_command_command($id_command))); ?>";
|
original_command = "<?php echo str_replace("\r\n", '<br>', addslashes(io_safe_output(alerts_get_alert_command_command($id_command)))); ?>";
|
||||||
render_command_preview(original_command);
|
render_command_preview(original_command);
|
||||||
command_description = "<?php echo str_replace("\r\n", '<br>', addslashes(io_safe_output(alerts_get_alert_command_description($id_command)))); ?>";
|
command_description = "<?php echo str_replace("\r\n", '<br>', addslashes(io_safe_output(alerts_get_alert_command_description($id_command)))); ?>";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user