#33589: Incomplete string escaping in formats for calendar.
-------------------------------------+-------------------------------------
Reporter: Shrikant Dhayje | Owner: Ankur Roy
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
bug,regex,Inaccurate | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: assigned => closed
* resolution: => invalid
* stage: Ready for checkin => Unreviewed
Comment:
Replying to [comment:8 Sander Beekhuis]:
> Hi all, just chiming in without much django contribution experience
>
> One can, in theory, set any `DATE_INPUT_FORMATS` in ones `settings.py`
>
> I set the following
>
> {{{
> USE_L10N = False
> DATE_INPUT_FORMATS = ["%Y-'''--%m-\t-%d"]
> }}}
>
> in my settings.py. It allows me to test the code paths discussed in this
patch. If I use admin date picker to pick dates they are formatted using
the logic in this JavaScript file.
>
> However even with a single `'` or `\t` in the format the behavior does
not seem work in a very sensible way. Improving them would take more then
the proposed patch. So dropping these replaces might make the most sense.
>
> When I get time to work on this issue again I can try write to write a
JS tests for this in the future. If that would be nice?
Ah yes, we should drop replacements. It was added in
fa0653cd1d791a8bce835e8992cbeab6fd70d0e7 where we created a callback
function by concatenating strings. It's unnecessary and buggy since
d638cdc42acec608c1967f44af6be32a477c239f.
--
Ticket URL: <https://code.djangoproject.com/ticket/33589#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070181608af75f-e935a41d-adc0-44e4-8751-d3f3b283e56a-000000%40eu-central-1.amazonses.com.