Maybe this Lib can help?
At least i found a reference to jsoup using google. And this is a lib about jsoup.
Use a HTML parser. Here's a Jsoup example.
String input = "<font size=\"5\"><p>some text</p>\n<p>another text</p></font>";
String stripped = Jsoup.parse(input).text();
System.out.println(stripped);
This is my first attempt at a wrapper so it's a work in progress. Consider it a Beta although it isn't feature complete, I'm adding features as I require them :) Not all functions and documentation implemented or tested fully yet. Library is compatible with B4A and B4J. 1. Download jsoup...
www.b4x.com
Don´t know if this lib has support for parse(input).text() though.
This is a wrapper for the OWASP Java HTML Sanitizer library. "A fast and easy to configure HTML Sanitizer written in Java which lets you include HTML authored by third-parties in your web application while protecting against XSS." I needed a way to sanitize request inputs to a web app after...
Dim Html As String = $"<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>"$
Log(Regex.Replace("<[^>]*>",Html,""))