GNOME Bugzilla – Bug 780088
Pasted URL not recognized/rendered as such; renders all remaining email text as link after pressing Enter
Last modified: 2017-04-29 10:02:00 UTC
Created attachment 347998 [details] Text to paste into message body evolution-3.22.6-1.fc25.x86_64 webkitgtk4-2.14.5-1.fc25.x86_64 webkitgtk-2.4.11-3.fc25.x86_64 STEPS TO REPRODUCE: 1. Copy the text in the text attachment into the clipboard 2. Edit > Preferences > Composer Preferences > General > Default Behavior > Format messages in HTML = NOT enabled 3. Have a default signatures for your own account enabled 4. Click "New" to open a mail composer window 5. Click into the first empty line of the body, above your signature 6. Paste from the clipboard into the message body. EXPECTED BEHAVIOR: Both links are recognized as links and rendered as a link ACTUAL BEHAVIOR: Only the first link is rendered as a link - see screenshot #1 7. Press the Enter key. EXPECTED BEHAVIOR: A new line ACTUAL BEHAVIOR: A new line and the second link plus all text after is rendered as a link - see screenshot #2 8. Press Ctrl+Z. EXPECTED BEHAVIOR: New line is removed and reverts to previous rendering. ACTUAL BEHAVIOR: New line is removed.
Created attachment 347999 [details] Screenshot #1
Created attachment 348000 [details] Screenshot #2
Fixed with the following commits: Bug 780088 - Pasted URL not recognized/rendered as such; renders all remaining email text as link after pressing Enter The main cause for both problems mentioned in the bug was the check for the non-breaking space in the regex that we are using to recognizing the URLs. Making it work would need a support for regexes in the negative lookbehind, but GRegex does not support them. In the end I decided to remove the check and check for the non-breaking space character in the code rather than in the regex itself. commit dff843c327 in the master branch for Evolution 3.25.2+ commit 1251551ab1 in the gnome-3-24 for Evolution 3.24.2+