Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.15.2, 6.1
-
None
-
Windows 10
Description
We are parsing HTML content in order to sanitize the HTML for our application. We iterate over the QTextBlock items in the QTextDocument and then for each QTextBlock, we iterate over the QTextFragment items. When the HTML contains id attributes, the fragments are not broken down correctly. For example:
<h1 id="header">Header</h1>
Will produce two fragments with "H" and "eader" and the "H" fragment will be marked as an anchor element.