Sanitize translated RichtText fields content

issue9453
review305991002
This commit is contained in:
Cédric Krier
2020-07-10 09:00:01 +02:00
parent 4539fccb2b
commit e0a1381c3f
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -1,3 +1,4 @@
* Sanitize translated RichtText fields content (issue9453)
* Allow configuration of default colors for graph and calendar
* Sanitize RichtText fields content (issue9405)
* Escape external string (issue9394)
+4 -4
View File
@@ -2342,12 +2342,12 @@ function eval_pyson(value){
el.find('div[contenteditable]').prop('contenteditable', !value);
},
translate_widget_set: function(el, value) {
el.find('div[contenteditable]').html(value);
el.find('div[contenteditable]').html(
Sao.HtmlSanitizer.sanitize(value || ''));
},
translate_widget_get: function(el) {
var input = el.find('div[contenteditable]');
this._normalize(input);
return input.html();
return this._normalize_markup(
el.find('div[contenteditable]').html());
}
});