Code

Opened 6 years ago

Closed 6 years ago

#6492 closed (fixed)

isValidFloat() should handle Unicode data

Reported by: Bastian Kleineidam <calvin@…> Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The isValidFloat() can receive Unicode data in which case str() fails.
The patch uses smart_str() to cope with this.

Attachments (2)

0023-isValidFloat-should-handle-Unicode-data.patch (1.3 KB) - added by Bastian Kleineidam <calvin@…> 6 years ago.
django-isvalidfloat-test.diff (684 bytes) - added by Bastian Kleineidam <calvin@…> 6 years ago.
unittest for isValidFloat() unicode fix

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Bastian Kleineidam <calvin@…>

comment:1 Changed 6 years ago by anonymous

  • Component changed from Uncategorized to Template system
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by SmileyChris

  • Needs tests set
  • Triage Stage changed from Unreviewed to Accepted

Straight-forwards patch, but may as well have a regression test...

Changed 6 years ago by Bastian Kleineidam <calvin@…>

unittest for isValidFloat() unicode fix

comment:3 Changed 6 years ago by Bastian Kleineidam <calvin@…>

  • Needs tests unset

comment:4 Changed 6 years ago by SmileyChris

  • Triage Stage changed from Accepted to Ready for checkin

Good good (next time, just combine the tests with the actual fix into one patch)

comment:5 Changed 6 years ago by mtredinnick

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

(In [7258]) Fixed #6492 -- Added bullet-proofing to isValidFloat validator. Thanks, Bastian Kleineidam.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.