﻿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 = """"""<p class=""storybody""><h2>Images and Text Do Not Mix</h2><br><br>This PowerPoint <a href=""http://www.slideshare.net/anilkr123/car-and-technology"" target=""_blank"">presentation on cars</a> (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 <a href=""http://www.pcworld.com/article/7774/make_a_bold_statement_with_text_in_powerpoint.html"" target=""_blank"">paragraphs of text</a> overlaid on them. This accomplishes the difficult feat of making the images hard to look at <i>and</i> the text hard to read. Perfect&#8212a lose-lose situation! <br><br>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</p>""""""

striptags(value)
}}}

Removing the ""&#8212"" 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
