Changes between Initial Version and Version 2 of Ticket #33589


Ignore:
Timestamp:
Mar 21, 2022, 1:03:46 AM (3 years ago)
Author:
Mariusz Felisiak
Comment:

Seems reasonable. Can you add a regression test? Do you have an example of the format with multiple occurrence of the same char that should be escaped?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33589

    • Property Cc Has patch https://github.com/django/django/pull/15460 removed
    • Property Needs tests set
    • Property Owner changed from nobody to Shrikant Dhayje
    • Property Triage Stage UnreviewedAccepted
    • Property Status newassigned
    • Property Summary Incomplete string escaping or encodingIncomplete string escaping in formats for calendar.
  • Ticket #33589 – Description

    initial v2  
    11At
    22The Given Code
    3 ```
     3{{{
    44390| handleCalendarCallback: function(num) {
    55391|            let format = get_format('DATE_INPUT_FORMATS')[0];
     
    99395|                .replace('\n', '\\n')
    1010396|                .replace('\t', '\\t')
    11 ```
     11}}}
    1212This replaces only the first occurrence of all the escape characters not all, and as per the the function is unable to completely accurate replacement of string with escape characters.
    1313
Back to Top