コード例 #1
0
def sheet_link(value):
	"""
	Returns a link to sheet with id value.
	"""
	value = int(value)
	sheet = get_sheet(value)
	if "error" in sheet:
		safe = "<a href='#'>[sheet not found]</a>"
	else:
		safe = "<a href='/sheets/%d'>%s</a>" % (value, strip_tags_func(sheet["title"]))
	return mark_safe(safe)
コード例 #2
0
def strip_tags(value):
	"""
	Returns the given HTML with all tags stripped.
	"""
	return mark_safe(strip_tags_func(value))