[FIX] web: encoding css on multi page

In the small cases where utf-8 is not escaped in the CSS of a module*, an error
could happen when breaking minified CSS on multiple page (for IE9).

For the issue #5050

*currenlty for 8.0 : https://gist.github.com/nle-odoo/e353b22f89031ced21a5
This commit is contained in:
Nicolas Lempereur 2015-04-07 11:15:40 +02:00
parent b8b8329044
commit bbeca2ddb3
1 changed files with 1 additions and 1 deletions

View File

@ -1219,7 +1219,7 @@ class AssetsBundle(object):
if page_number:
return content
if content is None:
css = self.css()
css = self.css().decode('utf-8')
re_rules = '([^{]+\{(?:[^{}]|\{[^{}]*\})*\})'
re_selectors = '()(?:\s*@media\s*[^{]*\{)?(?:\s*(?:[^,{]*(?:,|\{(?:[^}]*\}))))'
css_url = '@import url(\'/web/css.%%d/%s/%s\');' % (self.xmlid, self.version)