Skip to content

com.gargoylesoftware.htmlunit.html.DomNode.asText() returns nested elements with linebreaks #315

Description

@Deadc00l

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)

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions