Opened 12 years ago

Closed 5 years ago

Last modified 5 years ago

#19528 closed Bug (invalid)

CachedFilesMixin does not rewrite rules for css selector with path

Reported by: mike@… Owned by: Jason Novinger
Component: contrib.staticfiles Version: 1.4
Severity: Normal Keywords: CachedFilesMixin staticfiles djbday
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using CachedFilesMixin we'll have paths like this
<img alt="True" src="/media/static/admin/img/icon-yes.0596085e212f.gif">
after template rendering, but an unmodified selector:
img[src$="admin/img/icon-yes.gif"] in processed stylesheet.

This happens because CachedFilesMixin.patterns does not contain a rule like this """(img\[src[\^\$\*]{0,1}=\s*["']\s*(.*?)["'])""" to match against and actually can not deal with ^=|$=|*= operators. I am not sure how such paths can be properly processed, though.

Change History (4)

comment:1 by Anssi Kääriäinen, 12 years ago

Triage Stage: UnreviewedAccepted

Totally out of my expertise area, but seems valid.

comment:2 by Jason Novinger, 9 years ago

Owner: changed from nobody to Jason Novinger
Status: newassigned

comment:3 by Jason Novinger, 9 years ago

Keywords: djbday added

comment:4 by Mariusz Felisiak, 5 years ago

Resolution: invalid
Status: assignedclosed

This issue is not valid anymore because CachedFilesMixin and CachedStaticFilesStorage will be removed in Django 3.1 (see f1894bae3071da4ee577fc40ae61491f3e03d82c) and an eventual patch doesn't qualify for a backport.

Last edited 5 years ago by Mariusz Felisiak (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top