Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

fixed bug to do with replacing URLs within CSS

In particular, if you had::

  background: url(data:image...);

The outcome would then become::


thus missing the bracket.
  • Loading branch information...
commit 4f3f345bf6d7a898276bf58b3fee3bbefe47d278 1 parent f81243b
@peterbe authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tornado_utils/
6 tornado_utils/
@@ -8,7 +8,7 @@
-__version__ = '1.8'
+__version__ = '1.9'
import os
import cPickle
@@ -234,10 +234,10 @@ def replacer(match):
(filename.startswith("'") and filename.endswith("'")):
filename = filename[1:-1]
if 'data:image' in filename or filename.startswith('http://'):
- return filename
+ return 'url("%s")' % filename
if filename == '.':
# this is a known IE hack in CSS
- return filename
+ return 'url(".")'
# It's really quite common that the CSS file refers to the file
# that doesn't exist because if you refer to an image in CSS for
# a selector you never use you simply don't suffer.
Please sign in to comment.
Something went wrong with that request. Please try again.