<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/utils/text.py, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-03-09T12:41:00Z</updated>
<entry>
<title>Fixed #36293 -- Avoided buffering streaming responses in GZipMiddleware.</title>
<updated>2026-03-09T12:41:00Z</updated>
<author>
<name>farhan</name>
<email>farhanalirazaazeemi@gmail.com</email>
</author>
<published>2025-12-13T18:33:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=12bb16da8fbadac34e2de318cc79d7d765f35a96'/>
<id>urn:sha1:12bb16da8fbadac34e2de318cc79d7d765f35a96</id>
<content type='text'>
This avoids latency and/or blocking.

The example of streaming a CSV file was rewritten to employ batching for
greater efficiency in all layers (db, HTTP, etc.). The improved
performance from batching should outweigh the drag introduced by an
additional byte for each flush.

Co-authored-by: huoyinghui &lt;huoyinghui@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Fixed #36944 -- Removed MAX_LENGTH_HTML and related 5M chars limit references from HTML truncation docs.</title>
<updated>2026-02-25T16:08:52Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2026-02-25T13:37:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=bbc6818bc12f14c1764a7eb68556018195f56b59'/>
<id>urn:sha1:bbc6818bc12f14c1764a7eb68556018195f56b59</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed CVE-2026-1285 -- Mitigated potential DoS in django.utils.text.Truncator for HTML input.</title>
<updated>2026-02-03T12:54:16Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2026-01-21T12:53:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a33540b3e20b5d759aa8b2e4b9ca0e8edd285344'/>
<id>urn:sha1:a33540b3e20b5d759aa8b2e4b9ca0e8edd285344</id>
<content type='text'>
The `TruncateHTMLParser` used `deque.remove()` to remove tags from the
stack when processing end tags. With crafted input containing many
unmatched end tags, this caused repeated full scans of the tag stack,
leading to quadratic time complexity.

The fix uses LIFO semantics, only removing a tag from the stack when it
matches the most recently opened tag. This avoids linear scans for
unmatched end tags and reduces complexity to linear time.

Refs #30686 and 6ee37ada3241ed263d8d1c2901b030d964cbd161.

Thanks Seokchan Yoon for the report, and Jake Howard and Jacob Walls for
reviews.
</content>
</entry>
<entry>
<title>Fixed #36705 -- Avoided string concatenation in utils.</title>
<updated>2025-11-07T19:06:42Z</updated>
<author>
<name>Kasyap Pentamaraju</name>
<email>vpentamaraju@webmd.net</email>
</author>
<published>2025-11-03T17:27:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=1c7db70e79dce82f50d5958da64ab8e2807a31df'/>
<id>urn:sha1:1c7db70e79dce82f50d5958da64ab8e2807a31df</id>
<content type='text'>
Repeated string concatenation performs poorly on PyPy.
Thanks Seokchan Yoon for the report.
</content>
</entry>
<entry>
<title>Fixed #36656 -- Avoided truncating async streaming responses in GZipMiddleware.</title>
<updated>2025-10-21T14:45:12Z</updated>
<author>
<name>Adam Johnson</name>
<email>me@adamj.eu</email>
</author>
<published>2025-10-10T23:10:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a0323a0c44135c28134672e6e633e5f4a7a68d5d'/>
<id>urn:sha1:a0323a0c44135c28134672e6e633e5f4a7a68d5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #36341 -- Preserved whitespaces in wordwrap template filter.</title>
<updated>2025-04-23T19:14:03Z</updated>
<author>
<name>Matti Pohjanvirta</name>
<email>matti.pohjanvirta@iki.fi</email>
</author>
<published>2025-04-20T15:22:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=1e9db35836d42a3c72f3d1015c2f302eb6fee046'/>
<id>urn:sha1:1e9db35836d42a3c72f3d1015c2f302eb6fee046</id>
<content type='text'>
Regression in 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b.

This work improves the django.utils.text.wrap() function to ensure that
empty lines and lines with whitespace only are kept instead of being
dropped.

Thanks Matti Pohjanvirta for the report and fix.

Co-authored-by: Natalia &lt;124304+nessita@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Fixed CVE-2025-26699 -- Mitigated potential DoS in wordwrap template filter.</title>
<updated>2025-03-06T08:38:40Z</updated>
<author>
<name>Sarah Boyce</name>
<email>42296566+sarahboyce@users.noreply.github.com</email>
</author>
<published>2025-02-25T08:40:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b'/>
<id>urn:sha1:55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b</id>
<content type='text'>
Thanks sw0rd1ight for the report.
</content>
</entry>
<entry>
<title>Refs #30686 -- Removed unused regexes in django.utils.text.</title>
<updated>2024-02-15T07:39:14Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2024-02-15T07:39:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=3cadeea077a98367a4ed344d645df0aff243de91'/>
<id>urn:sha1:3cadeea077a98367a4ed344d645df0aff243de91</id>
<content type='text'>
Unused since 6ee37ada3241ed263d8d1c2901b030d964cbd161.</content>
</entry>
<entry>
<title>Fixed #30686 -- Used Python HTMLParser in utils.text.Truncator.</title>
<updated>2024-02-07T08:46:25Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2023-01-03T20:48:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6ee37ada3241ed263d8d1c2901b030d964cbd161'/>
<id>urn:sha1:6ee37ada3241ed263d8d1c2901b030d964cbd161</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #30686 -- Fixed text truncation for negative or zero lengths.</title>
<updated>2024-02-07T04:18:35Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2024-02-06T19:52:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=70f39e46f86b946c273340d52109824c776ffb4c'/>
<id>urn:sha1:70f39e46f86b946c273340d52109824c776ffb4c</id>
<content type='text'>
</content>
</entry>
</feed>
