summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-11-20 16:51:55 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-11-20 16:51:55 +0100
commit6bc1e836a74e4e4bc3ec77dfa63590e7bea688d9 (patch)
treefeb135e3670dffd860c67194537d7c4ed042f9f7
parent5f4f975d306df454098d4bcc3c8e464b4efe2dc5 (diff)
[FIX] pad: very bad conception that produced html injection that produced a lot of incorrect css
bzr revid: nicolas.vanhoren@openerp.com-20121120155155-y1wd0px4trljf453
-rw-r--r--addons/pad/static/src/js/pad.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index 929d62681c8..9e1b73e1f3b 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -37,7 +37,10 @@ openerp.pad = function(instance) {
}else{
this.content = '<div class="oe_pad_loading">... Loading pad ...</div>';
$.get(value+'/export/html').success(function(data){
- self.$('.oe_pad_content').html('<div class="oe_pad_readonly">'+data+'<div>');
+ groups = /\<\s*body\s*\>(.*?)\<\s*\/body\s*\>/.exec(data);
+ data = (groups || []).length >= 2 ? groups[1] : '';
+ self.$('.oe_pad_content').html('<div class="oe_pad_readonly"><div>');
+ self.$('.oe_pad_readonly').html(data);
}).error(function(){
self.$('.oe_pad_content').text('Unable to load pad');
});