Bug 1538775 - Indentation in plain text adds unwanted spaces around links
Summary: Indentation in plain text adds unwanted spaces around links
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: 27
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-25 19:43 UTC by Kevin L. Mitchell
Modified: 2018-01-26 09:06 UTC (History)
7 users (show)

Fixed In Version: evolution-3.26.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-26 09:06:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.