String html = "<b>One </b>Two"; TagNode node = cleaner.clean(html); String cleanedHtml = (new PrettyHtmlSerialiser(props, " ")).getAsString(node, "UTF-8");
will produce cleaned HTML of
<b>One</b>Two
dropping the space inside the tag.
SimpleHtmlSerialiser preserves the space.
Duplicate of 162.