From 04a92f0fbae8cee0e88b56e736a6c4178d39ca35 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 18 Apr 2019 21:48:40 -0700 Subject: Unescape all text fields (fix #4283) --- web/app/view/dialog/ComputedAttribute.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'web/app/view/dialog/ComputedAttribute.js') diff --git a/web/app/view/dialog/ComputedAttribute.js b/web/app/view/dialog/ComputedAttribute.js index 22cfb82..adae7f7 100644 --- a/web/app/view/dialog/ComputedAttribute.js +++ b/web/app/view/dialog/ComputedAttribute.js @@ -20,7 +20,9 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', { extend: 'Traccar.view.dialog.BaseEdit', requires: [ - 'Traccar.view.dialog.ComputedAttributeController' + 'Traccar.view.dialog.ComputedAttributeController', + 'Traccar.view.UnescapedTextField', + 'Traccar.view.UnescapedTextAreaField' ], controller: 'computedAttribute', @@ -28,14 +30,8 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', { items: { xtype: 'form', - listeners: { - afterrender: function (view) { - var field = view.up('panel').lookupReference('expressionField'); - field.setValue(Ext.String.htmlDecode(field.getValue())); - } - }, items: [{ - xtype: 'textfield', + xtype: 'unescapedTextField', name: 'description', fieldLabel: Strings.sharedDescription }, { @@ -49,7 +45,7 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', { change: 'onAttributeChange' } }, { - xtype: 'textareafield', + xtype: 'unescapedTextAreaField', reference: 'expressionField', name: 'expression', fieldLabel: Strings.sharedExpression, -- cgit v1.2.3