Bug 278790 - Telepathy chat handler places emoticons in URLs
Summary: Telepathy chat handler places emoticons in URLs
Alias: None
Product: telepathy
Classification: Unclassified
Component: text-ui (show other bugs)
Version: git-latest
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
Depends on:
Reported: 2011-07-29 15:03 UTC by Geert Lamers
Modified: 2012-07-06 12:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

Patch to fix wrongly parsed urls containing emoticons. (1.67 KB, patch)
2011-07-29 15:03 UTC, Geert Lamers

Note You need to log in before you can comment on or make changes to this bug.
Description Geert Lamers 2011-07-29 15:03:12 UTC
Created attachment 62306 [details]
Patch to fix wrongly parsed urls containing emoticons.

Version:           git-latest (using KDE 4.7.0) 
OS:                Linux

When a chat partner sends a URL, the chat handler replaces emoticons before the message is parsed for links. Any URL containing an emoticon is then no longer recognised as URL and thus not converted to link. In my case, the ':/' part of the protocol is replaced, rendering 90% of all links received unclickable.

Reproducible: Always

Steps to Reproduce:
Send (or receive) a URL containing a character sequence that is supposed to be replaced by an emoticon (for example, a URL prefixed with the protocol, where ':/' may be replaced by an emoticon (depends on emoticon theme)).

Actual Results:  
A funny face appears in the middle of the URL, link cannot be clicked.

Expected Results:  
No funny face, clickable link.

I've added a patch that reverses the order (parse for links first, then for emoticons) that seems to fix it.
Comment 1 David Edmundson 2011-08-01 11:53:00 UTC
Patch looks good.

Do you have a KDE git account? If so, please merge it! 

Otherwise write back, and one of us will merge for you.

(sorry for the late reply)
Thanks a lot.
Comment 2 Geert Lamers 2011-08-01 12:06:10 UTC
I don't have a git account, go ahead and merge it.

Glad to help :)
Comment 3 David Edmundson 2011-08-01 23:45:16 UTC
Git commit d59d56ab545192fef0c0961fdc8d0760f86b99a0 by David Edmundson, on behalf of Geert Lamers.
Committed on 02/08/2011 at 01:44.
Pushed by davidedmundson into branch 'master'.

Fix a bug in which emoticons can appear in URLs in messages, by swapping the order of processing

BUG: 278790

Reviewed by: David Edmundson

M  +6    -3    lib/adium-theme-view.cpp

Comment 4 Geert Lamers 2012-02-07 18:15:41 UTC
It seems this issue has reappeared.
Comment 5 David Edmundson 2012-02-07 18:56:26 UTC
Git commit ff89d55f6df486ad8ccf6c7a85e43dd2584b733c by David Edmundson.
Committed on 07/02/2012 at 19:54.
Pushed by davidedmundson into branch 'master'.

Fix emoticons appearing in URLs (and breaking everything)

M  +1    -1    lib/message-processor.cpp

Comment 6 David Edmundson 2012-02-07 18:57:37 UTC
We recently redid all the message processing, and in the process reversed some ordering.

That was really quickly spotted, thanks again!