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.
Merge pull request #1102 from glafarge/patch-1

[-] FO : Fix newline trim