Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19526 closed Bug (fixed)

CachedFilesMixin.patterns should be case-insensitive

Reported by: mike@… Owned by: Aleksandra Sendecka
Component: contrib.staticfiles Version: 1.4
Severity: Normal Keywords: CachedFilesMixin staticfiles
Cc: asendecka@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According to [1], all CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS. So, it seems like re.compile(pattern, re.IGNORECASE) is a valid and not so restricting way to go.

[1] http://www.w3.org/TR/CSS2/syndata.html#characters

Change History (8)

comment:1 Changed 4 years ago by Aymeric Augustin

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Aleksandra Sendecka

Cc: asendecka@… added
Has patch: set
Owner: changed from nobody to Aleksandra Sendecka
Status: newassigned

comment:3 Changed 4 years ago by Aleksandra Sendecka

Cc: asendecka@… added
Has patch: set
Owner: changed from nobody to Aleksandra Sendecka
Status: newassigned

comment:4 Changed 4 years ago by Aleksandra Sendecka

Cc: asendecka@… added
Has patch: set
Owner: changed from nobody to Aleksandra Sendecka
Status: newassigned

I added patch:
https://github.com/django/django/pull/809

[I experienced Trac problems - 504 - refreshed a couple of times and it resulted in multiple submit). Cannot remove it. ]

Last edited 4 years ago by Aleksandra Sendecka (previous) (diff)

comment:5 Changed 4 years ago by Aleksandra Sendecka

Cc: asendecka@… added
Has patch: set
Owner: changed from nobody to Aleksandra Sendecka
Status: newassigned

comment:6 Changed 4 years ago by Tomek Paczkowski

Triage Stage: AcceptedReady for checkin

comment:7 Changed 4 years ago by Aleksandra Sendecka <asendecka@…>

Resolution: fixed
Status: assignedclosed

In 32a7ab21482ef06f7e01a70fad8495f659c4d29f:

Fixed #19526

CSS specifications governs that syntax is case insensitive.
This modifies CachedFilesMixin to support that.

comment:8 Changed 4 years ago by Honza Král <Honza.Kral@…>

In 83ecb7b145644a1489db4137ac4d779bf1f294ca:

Merge pull request #809 from asendecka/ticket19526

Fixed #19526 - make regexes for css case insensitive

Note: See TracTickets for help on using tickets.
Back to Top