src/cm/utils/spannifier.py
changeset 516 c6105d922ac6
parent 502 8ec189cc214d
equal deleted inserted replaced
515:0be906e586e6 516:c6105d922ac6
    11     if nolinefeed and textNode.string == "\n":
    11     if nolinefeed and textNode.string == "\n":
    12       return False
    12       return False
    13     return not textNode.findParent('style') 
    13     return not textNode.findParent('style') 
    14 
    14 
    15 def get_the_soup(input):
    15 def get_the_soup(input):
    16     return BeautifulSoup(input, convertEntities=BeautifulSoup.ALL_ENTITIES)
    16     return BeautifulSoup(input, convertEntities=BeautifulSoup.ALL_ENTITIES, fromEncoding='UTF-8')
    17      
    17      
    18 from cm.utils.cache import memoize, dj_memoize
    18 from cm.utils.cache import memoize, dj_memoize
    19 @dj_memoize
    19 @dj_memoize
    20 def spannify(input, nolinefeed=True):
    20 def spannify(input, nolinefeed=True):
    21     """ 
    21     """