Bug 436880

Summary: Kmail ignores right-to-left text direction
Product: [Applications] kmail2 Reporter: xorshid
Component: composereditor-ngAssignee: Laurent Montel <montel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 17.04.2
Sentry Crash Report:

Description xorshid 2021-05-10 17:51:35 UTC
STEPS TO REPRODUCE
1. I mark a paragraph.
2. I click the "Right to Left" button in the toolbar.
3. I will send the message.
4. The direction of the paragraph appears left-to-right for the recipient. The dir attribute was removed before sending.

Source code before sending:
<p dir = 'rtl' style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; - qt-user-state: 0; "> راست به چپ. </ p>

Source code after receiving:
<p style = "margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0;"> راست به چپ. </ p> 


SOFTWARE/OS VERSIONS
ArchLinux/KDE Plasma
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kmail Version: 5.17.0 (21.04.0)
Comment 1 Laurent Montel 2021-05-12 11:49:53 UTC
I confirm it.
I will work on it.
Comment 2 Laurent Montel 2021-05-12 21:09:20 UTC
Git commit 4c58a536926315c7528ee7bb4595d3374ffef4d0 by Laurent Montel.
Committed on 12/05/2021 at 21:08.
Pushed by mlaurent into branch 'release/21.04'.

Fix Bug 436880 - Kmail ignores right-to-left text direction
FIXED-IN: 17.04.2

M  +2    -1    src/grantleebuilder/abstractmarkupbuilder.h
M  +2    -2    src/grantleebuilder/autotests/texthtmlbuildertest.cpp
M  +7    -1    src/grantleebuilder/markupdirector.cpp
M  +2    -1    src/grantleebuilder/plaintextmarkupbuilder.cpp
M  +2    -1    src/grantleebuilder/plaintextmarkupbuilder.h
M  +4    -1    src/grantleebuilder/texthtmlbuilder.cpp
M  +6    -2    src/grantleebuilder/texthtmlbuilder.h

https://invent.kde.org/pim/kpimtextedit/commit/4c58a536926315c7528ee7bb4595d3374ffef4d0