Exemplo n.º 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' data-id='%d'>%s</a>" % (value, value, strip_tags_func(sheet["title"]))
	return mark_safe(safe)
Exemplo n.º 2
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' data-id='%d'>%s</a>" % (value, value, strip_tags_func(sheet["title"]))
	return mark_safe(safe)
Exemplo n.º 3
0
def strip_tags(value):
	"""
	Returns the given HTML with all tags stripped.
	"""
	return mark_safe(strip_tags_func(value))
Exemplo n.º 4
0
def strip_tags(value):
    """
	Returns the given HTML with all tags stripped.
	"""
    return mark_safe(strip_tags_func(value))