diff --git a/addons/web_editor/static/src/js/backend/field_html.js b/addons/web_editor/static/src/js/backend/field_html.js index 80245b19007..7c7b1ec4559 100644 --- a/addons/web_editor/static/src/js/backend/field_html.js +++ b/addons/web_editor/static/src/js/backend/field_html.js @@ -265,8 +265,8 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, { // default can be set elsewhere otherwise. wysiwygOptions.allowCommandImage = Boolean(this.nodeOptions.allowCommandImage); } - if (this.field.sanitize && this.field.sanitize_tags) { - wysiwygOptions.allowCommandVideo = false; // Sanitized fields remove videos. + if (this.field.sanitize_tags || (this.field.sanitize_tags === undefined && this.field.sanitize)) { + wysiwygOptions.allowCommandVideo = false; // Tag-sanitized fields remove videos. } else if ('allowCommandVideo' in this.nodeOptions) { // Set the option only if it is explicitly set in the view so a // default can be set elsewhere otherwise. diff --git a/addons/web_editor/static/src/js/backend/html_field.js b/addons/web_editor/static/src/js/backend/html_field.js index d5105bd7285..4dd5f0a7a64 100644 --- a/addons/web_editor/static/src/js/backend/html_field.js +++ b/addons/web_editor/static/src/js/backend/html_field.js @@ -640,8 +640,8 @@ HtmlField.extractProps = ({ attrs, field }) => { // can be set elsewhere otherwise. wysiwygOptions.allowCommandImage = Boolean(attrs.options.allowCommandImage); } - if (field.sanitize && field.sanitize_tags) { - wysiwygOptions.allowCommandVideo = false; // Sanitized fields remove videos. + if (field.sanitize_tags || (field.sanitize_tags === undefined && field.sanitize)) { + wysiwygOptions.allowCommandVideo = false; // Tag-sanitized fields remove videos. } else if ('allowCommandVideo' in attrs.options) { // Set the option only if it is explicitly set in the view so a default // can be set elsewhere otherwise.