Improve html5lib test data parser