Line break and whitespace fixes in sanitizations

When encountering a <div> or <br> tag, these are treated as whitespace
rather than just being thrown away. Additionally, non-breaking space
will now be detected and collapsed down correctly.