#NEWLINE# def is_html_file_extension( url , allow_xhtml ) : #NEWLINE# #INDENT# ext = os . path . splitext ( _rfc3986 . urlsplit ( url ) [ 2 ] ) [ 1 ] #NEWLINE# html_exts = [ '.htm' , '.html' ] #NEWLINE# if allow_xhtml : #NEWLINE# #INDENT# html_exts += [ '.xhtml' ] #NEWLINE# #UNINDENT# return ( ext in html_exts )