Description of problem: Evolution appears to be substituting the Spaces in copied text with Non-breaking spaces even when the text is highlighted and "Preformatted" is set. This behaviour is particularly problematic when emailing patches to RHKL. Version-Release number of selected component (if applicable): * evolution-3.20.5-1.fc24.x86_64 How reproducible: * Always Steps to Reproduce: 1. Create a patch using git format-patch -1 2. Open the patch file in gvim 3. Copy and paste the text into Evolution "Compose Message" window. 4. Highlight the text in the "Compose Message" window and set the text to "Preformatted" 5. Send the email to yourself. 6. Once email is received, "Save as mbox...". 7. Inspect the file with a hex editor. Actual results: Non-breaking spaces appear at the start of lines. Expected results: Spaces appear at the start of the lines.
Thanks for a bug report. I'm only wondering, is the composer in the Plain text mode, or in the HTML mode?
No probs. Plain text mode. BTW, one workaround is to create a "New" email and immediately set it to "Preformatted" and then paste the patch into it.
(In reply to Harshula Jayasuriya from comment #0) > 3. Copy and paste the text into Evolution "Compose Message" window. > 4. Highlight the text in the "Compose Message" window and set the text to > "Preformatted" As you wrote it in the comment #6 to let it work correctly you have to change the format of the block to "Preformatted" before you paste to it. Otherwise the whitespaces will be indeed replaced to non-breaking spaces (as otherwise the spaces would collapse) and when you later switch from "Normal" to "Preformatted" the spaces are not replaced back (as we don't know which spaces were replaced to non-breaking ones - we have to somehow remember that, but it is not that easy).
IIRC, when replying to an email and pasting a patch, there was no way to avoid NBSPs. Do you have a workaround when replying to emails?
(In reply to Harshula Jayasuriya from comment #4) > IIRC, when replying to an email and pasting a patch, there was no way to > avoid NBSPs. Do you have a workaround when replying to emails? No it behaves the same even for the replies (it shares the same code). Please try this (I tried it on 3.20.5): 1) Reply to some plain text mail 2) Go on the first line on the mail, press the Return key, this will create a new block. Make sure that the block is set to "Preformatted" 3) Open gedit and copy&paste the following there: no space before one space before more spaces before <replace this with tabulator>tabulator before nothing before 4) Copy this and paste it to the block that you've created in step 2 5) Press Ctrl + Shift + i to open the WebKit Inspector 6) Paste the following to the console and compare the expected results command: document.body.firstChild.innerHTML expected: "no space before" command: document.body.firstChild.nextSibling.innerHTML expected: " one space before" command: document.body.firstChild.nextSibling.nextSibling.innerHTML expected: " more spaces before" command: document.body.firstChild.nextSibling.nextSibling.nextSibling.innerHTML expected: "<span class="Apple-tab-span" style="white-space:pre"> </span>tabulator before" command: document.body.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.innerHTML expected: "nothing before" If you would set the block format in step 2 to the "Normal" you would see the following: command: document.body.firstChild.innerHTML expected: "no space before" command: document.body.firstChild.nextSibling.innerHTML expected: " one space before" command: document.body.firstChild.nextSibling.nextSibling.innerHTML expected: " more spaces before" command: document.body.firstChild.nextSibling.nextSibling.nextSibling.innerHTML expected: "<span class="Apple-tab-span" style="white-space:pre"> </span>tabulator before" command: document.body.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.innerHTML expected: "nothing before" Does it provide the same output for you?
Hi Tomas, Apologies for the delay, I was on leave. a) I used some of the steps you suggested and found that I *can* reply to an email and insert preformatted text by doing the following: 1. Create a patch using git format-patch -1 2. Open the patch file in gvim 3. Reply to an email, press enter two times at the top. 4. Set the first empty line to "Preformatted". 5. Copy and paste the text into Evolution "Compose Message" window at the first empty line. 6. Send the email to yourself. 7. Once email is received, "Save as mbox...". 8. Inspect the file with a hex editor. b) Considering what has been documented in this BZ, perhaps it would be best to *disallow* highlighting existing text and setting it to preformatted until this NBSP issue is resolved? When was substituting spaces with NBSPs introduced into Evolution?
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.