Skip to content
Snippets Groups Projects
Commit 73f57819 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] web_editor: have video button even if sanitized


If a field is sanitized, a6e2b484 would hide the video button because
the video does not show in backend. It is better for the consistency but
if the field appear in frontend, the video would still show so we
prevent something that worked (but is very not user friendly when
editing in backend).

This changeset go back to the previous behavior (keeping the code
simplification), at one point there should be a fix so at least when
editing we see the video (currently we see an empty div in given
conditions).

opw-2463746

closes odoo/odoo#66434

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 27b84138
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
toolbar.splice(-1, 0, ['view', ['codeview']]);
}
}
if (self.field.sanitize && self.field.sanitize_tags) {
if (self.model === "mail.compose.message" || self.model === "mailing.mailing") {
options.noVideos = true;
}
options.prettifyHtml = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment