Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19526 closed Bug (fixed)

CachedFilesMixin.patterns should be case-insensitive

Reported by: mike@… Owned by: ethlinn
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 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by ethlinn

  • Cc asendecka@… added
  • Has patch set
  • Owner changed from nobody to ethlinn
  • Status changed from new to assigned

comment:3 Changed 2 years ago by ethlinn

  • Cc asendecka@… added
  • Has patch set
  • Owner changed from nobody to ethlinn
  • Status changed from new to assigned

comment:4 Changed 2 years ago by ethlinn

  • Cc asendecka@… added
  • Has patch set
  • Owner changed from nobody to ethlinn
  • Status changed from new to assigned

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 2 years ago by ethlinn (previous) (diff)

comment:5 Changed 2 years ago by ethlinn

  • Cc asendecka@… added
  • Has patch set
  • Owner changed from nobody to ethlinn
  • Status changed from new to assigned

comment:6 Changed 2 years ago by oinopion

  • Triage Stage changed from Accepted to Ready for checkin

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

  • Resolution set to fixed
  • Status changed from assigned to closed

In 32a7ab21482ef06f7e01a70fad8495f659c4d29f:

Fixed #19526

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

comment:8 Changed 2 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