Django

Code

Ticket #1198 (closed: fixed)

Opened 3 years ago

Last modified 3 years ago

backslash-escape doesn't work on date filters

Reported by: inerte@gmail.com Assigned to: adrian
Milestone: Component: Template system
Version: SVN Keywords: filter, date
Cc: dcf@europe.renre.com Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

published on {{ object.pub_date|date:"jS o\f F" }}

Shows published on 9th o8:28 January

I was expecting the same behaviour as now, since that's what the documentation says...

BTW

It is the {% now "jS o\f F" %}

Shows It is the 10th of January

I am taking the liberty of setting the Severity to "blocker" since I wouldn't want to see this on a production enviroment :)

Attachments

Change History

02/28/06 10:48:42 changed by dcf

The cause appears to be the fact that the FilterExpression? init method strips out the '\' from constant args, so by the time the format string gets to the format call, the format string has been modified to "js of F".

Anyone know why this is done?

03/06/06 08:37:38 changed by anonymous

  • cc set to dcf@europe.renre.com.

04/18/06 08:41:30 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [2713]) magic-removal: Fixed #1198 -- Modified handling of escape characters in filter arguments, and updated unit tests to reflect the change.


Add/Change #1198 (backslash-escape doesn't work on date filters)




Change Properties
Action