Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.8.1, 5.3.1, 5.4.0 Alpha
-
None
-
Windows 7 x64, MSVC 2013 x64 (qt 5.3.1)
Gentoo Linux, x64, gcc 4.7.3 r1 p1.4, (qt 5.4 alpha, 4.8.1)
Description
Inserting an anchor into a QTextDocument using QTextCursor does not work as expected:
QTextCursor::insertHtml("<a name='1.2'>anchor</p>") should result in a piece of html like the one input or eventually merged with <span>:
[more html in doc]<a name='1.2'><span ... >anchor</span></a>[more html]
but I get
[more html in doc]<a name='1.2'></a><span ... >anchor</span>[more html]
The closing tag is moved before the text to be embraced.
This does work fine and as expected if <a href=..> is used instead of <a name=..>.