Opened 13 years ago
Closed 13 years ago
#17865 closed Bug (fixed)
CachedStaticFilesStorage css rewriter should strip whitespaces from urls
Reported by: | Mikhail Korobov | Owned by: | nobody |
---|---|---|---|
Component: | contrib.staticfiles | Version: | 1.4-beta-1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have this rule in one of css files (note the extra whitespace in the url):
.b-error-page { background: url(../img/bg-error-page.png ) center 0 no-repeat; }
Browsers handle this fine, collectstatic raises an exception if CachedStaticFilesStorage is used:
ValueError: The file 'img/bg-error-page.png ' could not be found with <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at 0x2ee2350>.
I think css rewriter should just strip whitespaces in such cases.
Not sure if this is relevant, but anyway:
http://www.ietf.org/rfc/rfc3986 , Appendix C: "For robustness, software that accepts user-typed URI should attempt to recognize and strip both delimiters and embedded whitespace."
Change History (2)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In [17696]: