Esempio n. 1
0
def titlefilter(text):
    if not text: return ""
    text = text.strip()
    if not text: return ""

    key = hashlib.md5(text.encode('utf8')).hexdigest()
    cached = cache.get(key)
    if cached: return mark_safe(cached)

    text = widont( smartypants( caps( amp( text ) ) ) )

    cache.set( key, text )
    return mark_safe(text)
Esempio n. 2
0
def filter(content, block):
    return amp(content)
Esempio n. 3
0
def filter(content, block):
    return amp(content)