website cms: banner always has contenteditable="true"

Bug #1316900 reported by Ivan Yelizariev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Christophe Matthieu (OpenERP)

Bug Description

Steps:
* install trunk OpenERP
* install website module
* edit home page, add banner block, save

Banner block has contenteditable="true", so even anonymous user can click on banner and change content (but cannot save it), button on banner is not working

Revision history for this message
Ivan Yelizariev (yelizariev) wrote :
Revision history for this message
Ivan Yelizariev (yelizariev) wrote :

My suggestion is remove contenteditable attreibute at function "start" or "clean_for_save" at Class website.snippet.options.carousel BECAUSE "start" function (which inherited from
website.snippet.options.slide ) add contenteditable attribute

See main clean_for_save function:

        clean_for_save: function () {
            var self = this;
            $("*[contentEditable], *[attributeEditable]")
                .removeAttr('contentEditable')
                .removeAttr('attributeEditable');

            var options = website.snippet.options;
            var template = website.snippet.templateOptions;
            for (var k in options) {
                if (template[k] && options[k].prototype.clean_for_save !== dummy) {
                    var $snippet = this.dom_filter(template[k].selector);
                    $snippet.each(function () {
                        new options[k](self, null, $(this), k).clean_for_save();
                    });
                }
            }
        },

Changed in openobject-addons:
assignee: nobody → Christophe Matthieu (OpenERP) (chm-openerp)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.