no, I got some like this. <p> Text for text, <custom><custom/>, <another><another/> 1>0 5<10 </p> But, I fixed this using next code: HtmlCleaner cleaner = new HtmlCleaner(); CleanerProperties props = cleaner.getProperties(); props.setTreatUnknownTagsAsContent(true); props.setNamespacesAware(false); props.setOmitHtmlEnvelope(true); props.setOmitXmlDeclaration(false); TagNode node = cleaner.clean(input); String result = new CompactHtmlSerializer(props).getAsString(node); return result.replaceAll("<\\?xml.*\\?>",...
I have input some like this <p> Text for text, <custom>, <another/> 1>0 5<10 </p> But replace brackets only for "1>0 5<10" and create <custom> with close slash.</custom>
I have input some like this <p> Text for text, <custom>, <another/> 1>0 5<10 </p> But replace brackets only for "1>0 5<10"