from django.template.defaultfilters import escape as _escape
def escape(data):
	if type(data) == dict:
		for l in data:
			data[l] = escape(data[l])
		return data
	elif type(data) in [list, tuple]:
		return [escape(l) for l in data]
	else:
		return _escape(data)