Table breaks when converting from HTML

Hello all,

when converting following HTML snippet to XWiki 2.1 syntax, the table will be broken. If the span has no attributes, the table is as expected. Why is that?

<table border="1">
<tr>
<td>var</td>
<td><span style="color: #0000ff;">asdf<br/></span></td>
</tr>
<tr>
<td>bar</td>
<td>function</td>
</tr>
</table>
(% border="1" %)
|var|(%%)(% style="color: #0000ff;" %)asdf

|bar|function

without style="color: #0000ff;":

(% border="1" %)
|var|asdf\\
|bar|function

and it is also okay if you add some text between <br/> and </span>:

(% border="1" %)
|var|(%%)(% style="color: #0000ff;" %)asdf
foo
|bar|function

so it seems like the escaping of newline is lost when an attribute is present

I think the problem comes from around here, as in the example the new line is the last element of the table cell, but the next event will be endFormat so eventType.isInlineEnd() will not be true and therefore it will not be outputted as a line break.