Smarter handling of possible linefeeds inside XML.

Solves issue #200
Fix problem with unread count