Skip to content

Commit

Permalink
Not so common, but images can also have inline data using the data UR…
Browse files Browse the repository at this point in the history
…I scheme.
  • Loading branch information
bjornpost committed Jan 16, 2011
1 parent 2a58845 commit 48c72ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_static/templatetags/django_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def do_staticallfiles(parser, token):

SCRIPTS_REGEX = re.compile('<script [^>]*src=["\']([^"\']+)["\'].*?</script>')
STYLES_REGEX = re.compile('<link.*?href=["\']([^"\']+)["\'].*?>', re.M|re.DOTALL)
IMG_REGEX = re.compile('<img.*?src=["\']([^"\']+)["\'].*?>', re.M|re.DOTALL)
IMG_REGEX = re.compile('<img.*?src=["\']((?!data:)[^"\']+)["\'].*?>', re.M|re.DOTALL)

class StaticFilesNode(template.Node):
"""find all static files in the wrapped code and run staticfile (or
Expand Down

0 comments on commit 48c72ff

Please sign in to comment.