That's actually more the HTML way of handling text content.
It would really be better if the spec was really clear on what is allowed, what is a parsing error and how to handle these cases...