#NEWLINE# @ register . filter #NEWLINE# def strip_html( s , just_kidding = False ) : #NEWLINE# #INDENT# 'Strips HTML.  Confirm lets us opt out easily.' #NEWLINE# if just_kidding : #NEWLINE# #INDENT# return s #NEWLINE# #UNINDENT# if ( not s ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# s = re . sub ( '&lt;.*?&gt;' , '' , smart_unicode ( s , errors = 'ignore' ) ) #NEWLINE# return re . sub ( '<.*?>' , '' , s )