﻿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
21316	mark_safe documentation should note that strings will become unsafe if modified.	dev@…	Tim Graham	"This took me a while to figure out what was happening and it would be good to have this documented somewhere.



{{{
In [1]: from django.utils.safestring import mark_safe

In [2]: s = ""<blink>hello world</blink>    ""

In [3]: type(s)
Out[3]: str

In [4]: t = mark_safe(s)

# t is now 'safe': 
In [5]: type(t)
Out[5]: django.utils.safestring.SafeBytes

# let's remove that unnecessary white space....
In [6]: type(t.strip())
Out[6]: str    # and we're not safe anymore.
}}}"	Cleanup/optimization	closed	Documentation	1.4	Normal	fixed	mark_safe	vijay_shanker	Ready for checkin	1	0	0	0	1	0
