Bug 1538775

Summary: Indentation in plain text adds unwanted spaces around links
Product: [Fedora] Fedora Reporter: Kevin L. Mitchell <klmitch>
Component: evolutionAssignee: Milan Crha <mcrha>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: alexl, caillon+fedoraproject, lucilanga, mcrha, rhughes, rstrode, sandmann
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: evolution-3.26.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-26 09:06:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin L. Mitchell 2018-01-25 19:43:17 UTC
Description of problem:

I sent an email regarding a change to an annotation in a Jenkinsfile, instructing them to use a specific branch of the library.  The email I created had the information correct, but the actual email that was sent—and that was placed in my "Sent Items" folder—contained spaces that would have broken the code.

Version-Release number of selected component (if applicable):

evolution-3.26.4-1.fc27.x86_64

How reproducible:

I've been able to reproduce it several times.

Steps to Reproduce:
1. Compose a new message and select the body of the message.
2. Select "Preformatted" from the "Paragraph Style" menu.
3. Tap the "Increase Indent" button once.
4. Paste (specifically paste, with C-v; not type) the following text:
    @Library('library@master')
5. Select the text "master" from above and delete it by hitting backspace.
6. Paste (again, specifically paste, with C-v) the following text:
    some-branch

Actual results:

Even though the editor window will show text looking like the following:

    @Library('library@some-branch')

The actual email that is sent will look like:

    @Library(    'library@some-branch    ')

(Note I have not specifically counted the added spaces or looked closely at the actual byte-by-byte contents of the sent message.)

Expected results:

What I see in the editor window prior to sending the email should be exactly what gets sent.

Additional info:

As far as I can tell, reproducing this bug requires using "Preformatted" paragraph style, one level of "Increase Indent", and using c&p with the C-v keystroke.  In particular, I was not able to reproduce this by just typing the text directly.  I only had time to perform 3 tests after observing the bug, however, and it may be worthwhile to try varying some of the bits to see if a more minimal set of instructions can reproduce it.

Comment 1 Milan Crha 2018-01-26 09:06:33 UTC
Thanks for a bug report. I can reproduce it too. The trick was to have indented text split by an anchor (the "'library@some-branch" had been made clickable, due to magic-links.) The HTML part is saved properly, but the "export" to plain text adds those spaces (which is the indentation gap) in front of each text part, which is wrong in this case. Apart of this I noticed that the visual indentation size was 3 spaces, but the "exported" plain text version used 4 spaces per level, thus I fixed that too.

Created commit 20a5b39314 in evo master (3.27.90+) [1]
Created commit 2826313b9c in evo gnome-3-26 (3.26.5+)

[1] https://git.gnome.org/browse/evolution/commit/?id=20a5b39314