django.utils.text.wrap does not preserve newlines within text to be wrapped
After the fix for CVE-2025-26699, django.utils.text.wrap and wordwrap template filter no longer preserve empty lines in between lines in a text that is wrapped.
Given a text with an intentional empty line between paragraphs to wrap:
First line
Second line
it is wrapped to:
First line
Second line
Change History
(16)
| Owner: |
set to Matti Pohjanvirta
|
| Status: |
new → assigned
|
| Severity: |
Normal → Release blocker
|
| Triage Stage: |
Unreviewed → Accepted
|
| Needs documentation: |
set
|
| Patch needs improvement: |
set
|
| Needs documentation: |
unset
|
| Patch needs improvement: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
Hello Matti Pohjanvirta, thank you very much for taking the time to create this report. I can confirm this is a regression in 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b. I will review your patch shortly, could you please double check that the patch does not add any exploitable performance issues?