﻿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
5821	Adds decode_entities to utils.html	Samuel Adam <samuel.adam@…>	nobody	"This patch adds html entities decoding function to utils.html

== Description ==

Replaces HTML entities (name, decimal and hexadecimal) with unicode equivalents.[[BR]]
    
Ampersands, quotes and carets are not replaced by default.

== Usage ==

'''decode_entities''' can be used to normalize and store user input from a js html editor for example.[[BR]]
If you need to cut a string that could contain HTML entities, you can decode it before the cut without the fear of cutting through an entity.


== Examples ==
{{{
#!python
>>> from django.utils.html import decode_entities
>>> html = u'&lt;D&eacute;j&agrave; &#9001;&gt;'
>>> decode_entities(html)
u'&lt;D\xe9j\xe0 \u2329&gt;'
>>> decode_entities(html, decode_all=True)
u'<D\xe9j\xe0 \u2329>'
}}}


"		closed	Tools	dev		wontfix	html		Design decision needed	1	0	0	0	0	0
