[FIX] web_editor: sanitize html pasted in codeview
Before this commit: When we paste html using selectAll and we click code view button then the newly added template will be visible and immediately got removed by old template. This problem is because of pasted html is not sanitized. After this commit: Now when we paste html using selectAll then we actually see new html template in result. task-3473633 closes odoo/odoo#139384 X-original-commit: 6d6e1527ccdf5e616330905bc4b7e4fdd80c6192 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
committed by
visp-odoo
parent
45f70979a8
commit
0987ee5b5e
@@ -250,6 +250,8 @@ export class MassMailingHtmlField extends HtmlField {
|
||||
|
||||
if ($codeview.hasClass('d-none')) {
|
||||
this.wysiwyg.setValue($codeview.val());
|
||||
this.wysiwyg.odooEditor.sanitize();
|
||||
this.wysiwyg.odooEditor.historyStep(true);
|
||||
} else {
|
||||
$codeview.val(this.wysiwyg.getValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user