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 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'<Déjà 〈>' >>> decode_entities(html) u'<D\xe9j\xe0 \u2329>' >>> decode_entities(html, decode_all=True) u'' }}} " closed Tools dev wontfix html Design decision needed 1 0 0 0 0 0