id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 24001 Add a regression test for strip_tags, html encoding and unicode MemoryError twig mhall1 "We noticed some processes were using up to 22gb of memory and throwing MemoryError exceptions. Here's some sample code in a django/python shell: {{{ from django.template.defaultfilters import striptags value = """"""

Images and Text Do Not Mix



This PowerPoint presentation on cars (we know it\u2019s about cars because an introductory slide consists of the word ""CARS"" in huge, garish orange-and-blue letters) puts all of its images in the background (after applying a little tasteful fading), with paragraphs of text overlaid on them. This accomplishes the difficult feat of making the images hard to look at and the text hard to read. Perfect—a lose-lose situation!

The presenter could have consolidated the text in one part of the image, using the image\u2019s horizontal guiding lines; but that didn\u2019t happen, so the slide manages to look sloppy as well as unreadable. Bonus points for misspelling \u201ccarburetor.\u201d

"""""" striptags(value) }}} Removing the ""—"" after ""Perfect"" fixes the problem. The character is the long-dash, most likely copy pasted from Microsoft Word. Tested with v1.6.8 and v1.7.1" Cleanup/optimization closed Template system dev Normal needsinfo mhall1 Accepted 0 0 0 0 0 0