Fix newline trim

When using with <br /> format it now allows for 'b' and 'r' chars at the end of last line.
I think rtrim is not suitable when used with a word rather than a charlist.