When I try to create an HTML element from a given string containing an <a> tag followed by an <svg>, the parsed result introduces an unwanted whitespace between the link text and the <svg> element.
Steps to Reproduce:
Parse the following string using SwiftSoup:
let inputHTML = """
<a href="https://www.google.com">STRING<svg width="1em" height="1em"><circle cx="0.5em" cy="0.5em" r="0.5em" /></svg></a>
"""
let element = try Element(Tag.valueOf("span"), "")
try element.html(inputHTML)
Print the element variable, the result will be like below
Description:
When I try to create an HTML element from a given string containing an
<a>
tag followed by an<svg>
, the parsed result introduces an unwanted whitespace between the link text and the<svg>
element.Steps to Reproduce: