1 """This is a copy of the htmlDecode function in Webware.
3 @@TR: It implemented more efficiently.
7 from Cheetah
.Utils
.htmlEncode
import htmlCodesReversed
9 def htmlDecode(s
, codes
=htmlCodesReversed
):
10 """ Returns the ASCII decoded version of the given HTML string. This does
11 NOT remove normal HTML tags like <p>. It is the inverse of htmlEncode()."""
13 s
= s
.replace(code
[1], code
[0])