https://bugs.kde.org/show_bug.cgi?id=527959
Bug ID: 527959
Summary: HTML signature: link around an embedded image is
dropped
Classification: Applications
Product: kmail2
Version First 6.8.2
Reported In:
Platform: Debian unstable
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: composer
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Version: KMail 6.8.2 (26.08.2) in Kontact, kpimtextedit 26.08.2,
messagecomposer 26.08.2, Qt 6.11.2, Debian forky/sid
Steps to reproduce:
1. Identity -> Signature, "Use HTML", text containing
<a href="https://example.org/"><img src="banner.png" width="600"
height="200"></a>
with banner.png stored in the identity's image location.
2. Compose a new mail with this identity and send it to yourself.
(Alternatively: open the signature editor and press OK.)
Expected: the sent HTML contains <a href="https://example.org/"><img
src="cid:..."></a>.
Actual: <img src="cid:..." width="600" height="200" /> - the link is gone.
After OK in the signature editor the stored "Inline Signature" has also lost
the <a>.
Cause: KPIMTextEdit::RichTextComposerImages::loadImage()
(src/composer-ng/richtextcomposerimages.cpp) removes the matching image
fragment and inserts a new QTextImageFormat that only gets name, width and
height. The fragment's anchor properties (anchorHref, anchorNames) as well as
title/alt are lost. RichTextComposerNg::insertSignature()
(messagecomposer/src/composer-ng/richtextcomposerng.cpp) calls loadImage() for
every embedded signature image.
Possible fix: start from the original format instead of an empty one, e.g.
QTextImageFormat format = imageFormat;
format.setName(resourceName);
so anchor and other character properties are kept.
--
You are receiving this mail because:
You are watching all bug changes.