root/galaxy-central/eggs/Cheetah-2.2.2-py2.6-macosx-10.6-universal-ucs2.egg/Cheetah/Utils/htmlDecode.py

リビジョン 3, 437 bytes (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1"""This is a copy of the htmlDecode function in Webware.
2
3@@TR: It implemented more efficiently.
4
5"""
6
7from Cheetah.Utils.htmlEncode import htmlCodesReversed
8
9def 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()."""
12    for code in codes:
13        s = s.replace(code[1], code[0])
14    return s
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。