Skip to content

Commit 29b36b8

Browse files
committed
Ensure quotes are replaced correctly for SVG urls
1 parent ff44dcc commit 29b36b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipeline/compressors/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ def concatenate_and_rewrite(self, paths, output_filename, variant=None):
127127
def reconstruct(match):
128128
asset_path = match.group(1)
129129
if NON_REWRITABLE_URL.match(asset_path):
130-
return "url(%s)" % asset_path
130+
return 'url("%s")' % asset_path
131131
asset_url = self.construct_asset_path(asset_path, path,
132132
output_filename, variant)
133-
return "url(%s)" % asset_url
133+
return 'url("%s")' % asset_url
134134
content = self.read_text(path)
135135
# content needs to be unicode to avoid explosions with non-ascii chars
136136
content = re.sub(URL_DETECTOR, reconstruct, content)

0 commit comments

Comments
 (0)