diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-01-18 16:50:18 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2016-01-18 17:09:02 +0100 |
| commit | 365e298fb1907085d4071285c2be5dbcd5c59a0e (patch) | |
| tree | ebb01554d80256f2c9a8b8ebcf10f59a4086af99 /addons/web_editor/static/src/js/transcoder.js | |
| parent | 57fe8147f3e3f46601ad10adef022260e465f3ac (diff) | |
[FIX] web_editor: inliner don't apply color when background-color
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
| -rw-r--r-- | addons/web_editor/static/src/js/transcoder.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js index 24465804bc8..5e699367dc2 100644 --- a/addons/web_editor/static/src/js/transcoder.js +++ b/addons/web_editor/static/src/js/transcoder.js @@ -169,7 +169,7 @@ var class_to_style = function ($editable) { var css = getMatchedCSSRules(this); var style = $target.attr("style") || ""; _.each(css, function (v,k) { - if (style.indexOf(k) === -1) { + if (!(new RegExp('(^|;)\s*' + k).test(style))) { style = k+":"+v+";"+style; } }); @@ -187,7 +187,7 @@ var style_to_class = function ($editable) { var css = getMatchedCSSRules(this); var style = ""; _.each(css, function (v,k) { - if (style.indexOf(k) === -1) { + if (!(new RegExp('(^|;)\s*' + k).test(style))) { style = k+":"+v+";"+style; } }); |
