diff --git a/css_html_js_minify/css_minifier.py b/css_html_js_minify/css_minifier.py index 1bb7c17..580310f 100644 --- a/css_html_js_minify/css_minifier.py +++ b/css_html_js_minify/css_minifier.py @@ -291,7 +291,7 @@ def restore_needed_space(css): def unquote_selectors(css): """Fix CSS for some specific selectors where Quotes is not needed.""" - return re.compile('([a-zA-Z]+)="([a-zA-Z0-9-_\.]+)"]').sub(r'\1=\2]', css) + return re.compile(r'([a-zA-Z]+)="([a-zA-Z0-9-_\.]+)"]').sub(r'\1=\2]', css) def css_minify(css, wrap=False, comments=False, sort=False, noprefix=False): diff --git a/css_html_js_minify/html_minifier.py b/css_html_js_minify/html_minifier.py index da9b646..520ba9d 100644 --- a/css_html_js_minify/html_minifier.py +++ b/css_html_js_minify/html_minifier.py @@ -106,10 +106,10 @@ def unquote_html_attributes(html): space1 = re.compile(r'\w\s+\w', re.MULTILINE) space2 = re.compile(r'"\s+>', re.MULTILINE) space3 = re.compile(r"'\s+>", re.MULTILINE) - space4 = re.compile('"\s\s+\w+="|\'\s\s+\w+=\'|"\s\s+\w+=|\'\s\s+\w+=', + space4 = re.compile(r'"\s\s+\w+="|\'\s\s+\w+=\'|"\s\s+\w+=|\'\s\s+\w+=', re.MULTILINE) space6 = re.compile(r"\d\s+>", re.MULTILINE) - quotes_in_tag = re.compile('([a-zA-Z]+)="([a-zA-Z0-9-_\.]+)"') + quotes_in_tag = re.compile(r'([a-zA-Z]+)="([a-zA-Z0-9-_\.]+)"') # iterate on a for loop cleaning stuff up on the html markup. for tag in iter(any_tag.findall(html)): # exceptions of comments and closing tags