parse: better <data> with newline handling

The browser tests were failing...