Changed Jquery .text for .html for html conversion

Former-commit-id: 9dd9c63e637e504ff51e38165687bacfae59ed38
This commit is contained in:
Luis Calvo 2019-04-01 17:57:22 +02:00
parent 2d26a74f9e
commit 4c95a160de
2 changed files with 4 additions and 5 deletions

View File

@ -318,9 +318,9 @@ $(document).ready (function () {
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
values,
function (data, status) {
original_command = js_html_entity_decode (data["command"]);
original_command = data["command"];
render_command_preview (original_command);
command_description = js_html_entity_decode (data["description"]);
command_description = data["description"];
render_command_description(command_description);
var max_fields = parseInt('<?php echo $config['max_macro_fields']; ?>');

View File

@ -1,5 +1,4 @@
var original_command = "";
function parse_alert_command(command, classs) {
if (classs == "recovery") {
classs = "fields_recovery";
@ -28,13 +27,13 @@ function parse_alert_command(command, classs) {
}
function render_command_preview(original_command) {
$("#textarea_command_preview").text(
$("#textarea_command_preview").html(
parse_alert_command(original_command, "")
);
}
function render_command_recovery_preview(original_command) {
$("#textarea_command_recovery_preview").text(
$("#textarea_command_recovery_preview").html(
parse_alert_command(original_command, "recovery")
);
}