summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend/field_html.js
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-02-04 08:08:11 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-02-11 14:44:01 +0000
commit3ee9a9fbdc7ec099af08e9116cea92e39aa5bb36 (patch)
tree71d0337c3da750a8fe8eba09269741872911485e /addons/web_editor/static/src/js/backend/field_html.js
parent12c3fd26499b746590fcab520ff7032a65cd5630 (diff)
[FIX] web_editor: deny videos in mass mailing
Create a new mass mailing, add a video via youtube embed link, save. Send email. Embedding a video can't work because it embeds an iframe, which is not supported by most email clients for security reasons. Extending the noVideo flag also to mass_mailing opw-2179665 closes odoo/odoo#45104 X-original-commit: f9f8c9cc4075fdc5fd4556aa49c914054469198a Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/backend/field_html.js')
-rw-r--r--addons/web_editor/static/src/js/backend/field_html.js4
1 files changed, 4 insertions, 0 deletions
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 75548eee4b8..1905c350f7b 100644
--- a/addons/web_editor/static/src/js/backend/field_html.js
+++ b/addons/web_editor/static/src/js/backend/field_html.js
@@ -187,6 +187,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
* @returns {Object}
*/
_getWysiwygOptions: function () {
+ var self = this;
return Object.assign({}, this.nodeOptions, {
recordInfo: {
context: this.record.getContext(this.recordParams),
@@ -221,6 +222,9 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
toolbar.splice(-1, 0, ['view', ['codeview']]);
}
}
+ if ("mailing.mailing" === self.model) {
+ options.noVideos = true;
+ }
options.prettifyHtml = false;
return options;
},