#NEWLINE# def WIKI( text , encoding = 'utf8' , safe_mode = 'escape' , html4tags = False , **attributes ) : #NEWLINE# #INDENT# if ( not text ) : #NEWLINE# #INDENT# test = '' #NEWLINE# #UNINDENT# if attributes . has_key ( 'extras' ) : #NEWLINE# #INDENT# extras = extras [ 'extras' ] #NEWLINE# del attributes [ 'extras' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# extras = None #NEWLINE# #UNINDENT# text = text . decode ( encoding , 'replace' ) #NEWLINE# return XML ( markdown ( text , extras = extras , safe_mode = safe_mode , html4tags = html4tags ) . encode ( encoding , 'xmlcharrefreplace' ) , ** attributes )