Hello. I sometimes receive problematic user input. I've isolated the problem to nested link tags. Without context, it looks like this:
let html = """
<a href="/outer.html">Outer link <a href="/inner.html">innerlink</a> outer link</a>
"""
And when I let document: Document = try SwiftSoup.parse(html); print(document), then I get this.
<html>
<head></head>
<body>
<a href="/outer.html">Outer link </a>
<a href="/inner.html">innerlink</a> outer link
</body>
</html>
I would like to be able to get all of the text inside the outer link. However, the </a> tag gets moved forward. How do I get an output that is more like this?
Outer link <a href="/inner.html">innerlink</a> outer link
or, perhaps, like this:
<a href="/outer.html">Outer link innerlink outer link</a>
Hello. I sometimes receive problematic user input. I've isolated the problem to nested link tags. Without context, it looks like this:
And when I
let document: Document = try SwiftSoup.parse(html); print(document)
, then I get this.I would like to be able to get all of the text inside the outer link. However, the
</a>
tag gets moved forward. How do I get an output that is more like this?or, perhaps, like this:
Thanks so much for this library!