Write better trim method which also removes html line breaks