Merge lp:~vaab/openerp-web/fix-view-editor-eating-form-elements into lp:openerp-web/6.1

Proposed by Valentin Lab on 2012-03-29
Status: Rejected
Rejected by: Nicolas Vanhoren (OpenERP) on 2012-06-06
Proposed branch: lp:~vaab/openerp-web/fix-view-editor-eating-form-elements
Merge into: lp:openerp-web/6.1
Diff against target: 12 lines (+1/-1) 1 file modified
To merge this branch: bzr merge lp:~vaab/openerp-web/fix-view-editor-eating-form-elements
Reviewer Review Type Date Requested Status
OpenERP Core Team 2012-03-29 Pending
Review via email: mp+99878@code.launchpad.net

Description of the Change

This small changes avoid using jQuery as a XML tokenizer as it's not an XML tokenizer (it'll remove a lot of HTML elements to simplify the code).

Please check the bug report to get more info.

To post a comment you must log in.

Thanks for contributing to OpenERP

Unfortunately, by the time I checked this bug, another fix was already provided by someone of our team. Since I have to make a choice between your code and his, I just prefer to merge his because I know he is one of the persons that worked on this part and I assume he know it better, plus I know he conform to our testing guidelines.

Ha yes, the patch from Vidhin also does the same thing than yours :)

Unmerged revisions

2292. By Valentin Lab on 2012-03-28

[FIX] view_editor could dangerously trim the XML view.

Preview Diff

1=== modified file 'addons/web/static/src/js/view_editor.js'
2--- addons/web/static/src/js/view_editor.js 2012-02-13 10:53:41 +0000
3+++ addons/web/static/src/js/view_editor.js 2012-03-29 06:16:20 +0000
4@@ -631,7 +631,7 @@
5 if (insert.length == _.uniq(check_list).length ) {return xml_child;}
6 });
7 }
8- arch_to_pass = _.filter($(arch.arch), function (child) {
9+ arch_to_pass = _.filter(xml_arch.childNodes, function (child) {
10 return child.nodeType == 1;
11 });
12 return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);