#21080: collectstatic post-processing fails for references inside comments
-------------------------------------+-------------------------------------
Reporter: shreyas@… | Owner: Tomáš
| Zigo
Type: Bug | Status: assigned
Component: contrib.staticfiles | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jake Bell):
I'd also like to note that this bug also errors out when processing the
CSS from Bootstrap 5, as it gets hung up on the SVG data URIs:
{{{
ValueError: The file '\"data:image/svg+xml,<svg
xmlns='http:/www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none'
stroke='' could not be found with
<django.contrib.staticfiles.storage.ManifestStaticFilesStorage object at
0x106955d00>.
}}}
This seems like a pretty significant issue to me, given the popularity of
Bootstrap. Simply parsing out the comments wouldn't be enough to fix the
above issue. It seems like what is needed is either a proper CSS parser
(like in the linked thread about JS files--perhaps
[https://tinycss.readthedocs.io/]?) or a better regex that can exclude
`url(data:)` items.
--
Ticket URL: <https://code.djangoproject.com/ticket/21080#comment:27>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/010701874ec3245f-bc9a0421-73f6-4af5-bb4d-3f288ffe105f-000000%40eu-central-1.amazonses.com.