コード例 #1
0
def strip_html_entities(text):
	text = text if text else ""
	text = text.replace("<br>", "\n")
	text = text.replace("&amp;", "&")
	text = text.replace("&nbsp;", " ")
	return mark_safe(text)
コード例 #2
0
ファイル: sefaria_tags.py プロジェクト: zoejf/Sefaria-Project
def strip_html_entities(text):
    text = text if text else ""
    text = text.replace("<br>", "\n")
    text = text.replace("&amp;", "&")
    text = text.replace("&nbsp;", " ")
    return mark_safe(text)