The Django template syntax sometimes accepts literal strings only in double quotes, whereas in other situations also single quotes work. Including a quote in a string by escaping it with a backslash doesn't work everywhere. Implementing SmileyChris's suggestion to #5756 (filter expressions as arguments for the cycle, ifchanged, ifequal, firstof and include tags) is difficult because of incosistencies in the underlying mechanisms.
String literals are dealt with in the FilterExpression and Variable classes in django/template/__init__.py. The classes contain two different and overlapping approaches to unquoting string literals. FilterExpression embeds unquoting in the regex which parses filter expressions, and Variable takes a more "manual" approach.
With some modifications the following could be achieved:
- both single and double quoted strings work everywhere
- filters as template tag arguments easier to implement (see #5756)
- escaping quotes works consistently
- code re-use (DRY)
The challenge is to not lose performance.