[evolution/wip/webkit2] EHTMLEditorView - Restore the selection end mark correctly when processing HTML to plain text
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
evolution (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Jamie Strandboge | ||
Artful |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Ubuntu 16.04 evolution users sometimes send emails with ##SELECTION_END## due to a copy/paste error in the EHTMLEditorView code when converting HTML to plain text.
This is fixed in newer Ubuntu releases. The fix is a from upstream:
https:/
[Test Case]
I tried to find a test case but was unable to as it doesn't seem to always happen and there is no upstream bug or steps to reproduce. The code change is obvious though. This is the broken code:
if (strstr (*text, "##SELECTION_
GString *tmp;
tmp = e_str_replace_
*text,
"##SELECTION_
"<span id=\"-x-
g_free (*text);
*text = g_string_free (tmp, FALSE);
}
if (strstr (*text, "##SELECTION_
GString *tmp;
tmp = e_str_replace_
*text,
"##SELECTION_
"<span id=\"-x-
g_free (*text);
*text = g_string_free (tmp, FALSE);
}
Notice how if it finds ##SELECTION_END## in the text, it will not end up replacing it because it tries to replace ##SELECTION_START## instead. Contrast that to the stanza just above it that correctly searches for and replaces ##SELECTION_
Test case then is simply testing for no regressions:
1. send an html mail
2. respond to an html in html
3. respond to an html in plain text
4. send an email in plain text
5. respond to a plain text email in html
6. respond to a plain text email in plain text
[Regression Potential]
The regression potential is considered low since the change is minimal and obviously correct. In addition I personally used the patch for months (until upgrading to 17.04) and have several users that also use it without issue.
== Original description ==
From https:/
"EHTMLEditorView - Restore the selection end mark correctly when processing HTML to plain text
Otherwise the ##SELECTON_END## string could be left in the output."
I sometimes see this from people on xenial. Patch in the commit list needs a light backport. I will attach a debdiff if it works.
description: | updated |
tags: | added: patch |
description: | updated |
Changed in evolution (Ubuntu): | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
status: | Confirmed → In Progress |
Changed in evolution (Ubuntu Artful): | |
status: | In Progress → Fix Released |
assignee: | Jamie Strandboge (jdstrand) → nobody |
Changed in evolution (Ubuntu Xenial): | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
status: | New → In Progress |
description: | updated |
description: | updated |
description: | updated |
Changed in evolution (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Here is a debdiff that fixes an obviously wrong piece of code that is simple for an SRU. I don't yet have a reproducer.