Don't use the regular expression that we used before - it's wrong as it will
also apply on PRE elements and we don't want that. When generating the plain
text version of the editor's content skip all the text nodes with '\n' content
when their parent is not a PRE element. Also remove the BR element (if
presented) from the current element when inserting a HTML content otherwise an
extra new block will be inserted.