mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #36348 -- Fixed handling multiple nested url()s in ManifestStaticFilesStorage.
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
This commit is contained in:
parent
994dc6d8a1
commit
1ba5fe19ca
3 changed files with 12 additions and 1 deletions
|
|
@ -0,0 +1,3 @@
|
|||
#example {
|
||||
background-image: url("data:image/svg+xml,url(%23b) url(%23c)");
|
||||
}
|
||||
|
|
@ -235,6 +235,13 @@ class TestHashedFiles:
|
|||
self.assertIn(b"other.d41d8cd98f00.css", content)
|
||||
self.assertPostCondition()
|
||||
|
||||
def test_css_data_uri_with_nested_url(self):
|
||||
relpath = self.hashed_file_path("cached/data_uri_with_nested_url.css")
|
||||
with storage.staticfiles_storage.open(relpath) as relfile:
|
||||
content = relfile.read()
|
||||
self.assertIn(b'url("data:image/svg+xml,url(%23b) url(%23c)")', content)
|
||||
self.assertPostCondition()
|
||||
|
||||
def test_css_source_map(self):
|
||||
relpath = self.hashed_file_path("cached/source_map.css")
|
||||
self.assertEqual(relpath, "cached/source_map.b2fceaf426aa.css")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue