Deadc00l · GitHub

In the case of nested elements, the text of span element is output with linebreaks:

<span>
    <select name="day" size="1">...</select>
    <select name="month" size="1">...</select>
    <select name="year" size="1">...</select>
</span>

output:
1
JAN
2021

Therefore, real line breaks, like < /br> cannot be distinguished in output text from blocks. This worked fine in the earlier versions like 2.18
It seems that the status is set incorrectly after a block, see:
com.gargoylesoftware.htmlunit.html.HtmlSerializer.HtmlSerializerTextBuilder.append(String, Mode)

Read the original on github.com ↗