jsoup icon indicating copy to clipboard operation
jsoup copied to clipboard

text() is missing a separator space between <button> text nodes

Open KennyWongPFPT opened this issue 1 year ago • 1 comments

Hello,

Jsoup.parse("<html><button>Reply</button><button>ReplyToAll</button></html>").text();

When trying to grab text() from this test case, we get "ReplyReplyToAll" (expecting "Reply ReplyToAll"). Notice that a separator space is missing between the two text nodes Reply and ReplyToAll. Would it be possible to get a fix for this?

Thank you.

KennyWongPFPT avatar Jan 19 '24 17:01 KennyWongPFPT

What class is this specifically?

MasterChiefNemo avatar Feb 04 '24 18:02 MasterChiefNemo

Thanks, have implemented this. Per the spec it's an inline tag which doesn't really require spaces to be added, but given how browsers render it, I think it makes sense.

jhy avatar Jul 01 '24 03:07 jhy