pandora/pandora/annotation/utils.py
2012-05-27 13:52:12 +02:00

12 lines
284 B
Python

# -*- coding: utf-8 -*-
# ci:si:et:sw=4:sts=4:ts=4
import ox
def cleanup_value(value, layer_type):
#FIXME: what about other types? location etc
if layer_type == 'text':
value = ox.sanitize_html(value)
else:
value = ox.escape_html(value)
return value