Replace newline chars with whitespace (fixes #43)

Instead of removing newlines, it replaces them with spaces. This is important to handle multiline HTML properly.