Avoid modification of not normalized value from richtext widget

issue7313
review46321002
This commit is contained in:
Cédric Krier committed 2018-04-13 18:45:50 +02:00
1 parent f809c0b6f1
commit 5302206ce4
1 file changed
+7
+7
View File
@@ -2049,8 +2049,15 @@ function eval_pyson(value){
this.input.focus();
},
set_value: function(record, field) {
// avoid modification of not normalized value
this._normalize(this.input);
var value = this.input.html() || '';
var previous = field.get_client(record);
var previous_el = jQuery('<div/>').html(previous || '');
this._normalize(previous_el);
if (value == previous_el.html()) {
value = previous;
}
field.set_client(record, value);
},
_normalize: function(el) {