#36348: ManifestStaticFilesStorage breaks CSS containing data: URIs with 
multiple
nested url()s
-------------------------------------+-------------------------------------
               Reporter:  Samuel     |          Owner:  Samuel Cormier-
  Cormier-Iijima                     |  Iijima
                   Type:             |         Status:  assigned
  Uncategorized                      |
              Component:             |        Version:  5.2
  contrib.staticfiles                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Consider a CSS file containing the following:

 {{{
 a {
   background-image:
 url("data:image/svg+xml;charset=utf-8,filter='url(%23b)'
 filter='url(%23c)'");
 }
 }}}

 When this is processed by ManifestStaticFilesStorage, the output is this:

 {{{
 a {
   background-image:
 url("data:image/svg+xml;charset=utf-8,filter='url(%23b)'
 filter='url("#c")'");
 }
 }}}

 Notice that the second url() has been changed and now contains a double
 quote, which is invalid. The entire data: URI should be left as-is, but
 the regex in the CSS replacement patterns does not account for this case
 and sees the closing paren of the first nested url() as the end.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36348>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019660575176-441bd73f-dab9-46db-9105-d626f0147801-000000%40eu-central-1.amazonses.com.

Reply via email to