#NEWLINE# def normalize( string , removeNewline = False ) : #NEWLINE# #INDENT# import supybot.utils as utils #NEWLINE# string = string . replace ( '\\n\\n' , '\n\n' ) #NEWLINE# string = string . replace ( '\\n' , ' ' ) #NEWLINE# string = string . replace ( '\\"' , '"' ) #NEWLINE# string = string . replace ( "'" , "'" ) #NEWLINE# string = utils . str . normalizeWhitespace ( string , removeNewline ) #NEWLINE# string = string . strip ( '\n' ) #NEWLINE# string = string . strip ( '\t' ) #NEWLINE# return string