Opened 7 months ago

Last modified 7 months ago

#35197 closed Bug

floatformat combined with intcomma filters misformatting in Django 4.2.10 — at Initial Version

Reported by: nathangeffen Owned by: nobody
Component: Template system Version: 4.2
Severity: Normal Keywords: intcomma, floatformat
Cc: nathangeffen Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

A security bug was removed from the intcomma template filter in Django 4.2.10. But it appears a bug was introduced that misformats numbers when the intcomma filter is combined with floatformat.
The problem is a leading comma is added to some numbers (I suspect it is numbers with exactly 3 digits).

Example code that worked in 4.2.7 but now misformatting in 4.2.10:
{{total_amount|floatformat:"2"|intcomma}}

I have not filed a bug on this system before and hope to be able to attach screenshots.

Change History (2)

Note: See TracTickets for help on using tickets.
Back to Top