Version: (using KDE KDE 3.1.94) Installed from: Compiled From Sources OS: Linux It seems that Kopete tries to identify smileys in text before it tries to find URL's.
This is yet another bad behavior of our new emoticon parsing aloritm. (the one which parse EVERY occurence of an emoticon string with the emoticon) for rappel: The previous algoritm only remplaced if there were preceded and followed by spaces or separators (word boundary?). It has been changed just because a suite of emoticons was not parsed correctly ( :-D:-D:-D:-D ) Again, i'm all for the old algoritm.
Is it not possible to have the emoticon parser simply skip URL's? I assume you parse messages in multiple passes. If you mark URL's during the first pass, you can easily skip them when you look for emoticons in the second pass.
Subject: Re: [Kopete-devel] The ":/" part of "http://" in URL's are replaced with smileys Hrnm, why can't we just do the link replacement after the emotiocon parsing instead of before it? And add :// as a parsing exemption in the emotiocon regex
> Is it not possible to have the emoticon parser simply skip URL's? It could be possible, but not as easy as that. The message is and stay an HTML string, so the url is simply inbetween <a ...> and </a> There is already some regexp to don't remplace emoticons IN the tag (i.e: the href), and it would be much more difficult to search for more and more negative case.
> why can't we just do the link replacement after the emotiocon parsing will be even worse, since even the href="" will be corrupted
Subject: Re: [Kopete-devel] The ":/" part of "http://" in URL's are replaced with smileys On December 10, 2003 9:34 am, Olivier Goffart wrote: > > why can't we just do the link replacement after the emotiocon parsing > will be even worse, since even the href="" will be corrupted No it won't, the emotiocon regex does not replace anything inside HTML tags. (<>) The part linked to would be though. As in, it would be like: <a href="http://foo.bar">http(Smile)/foo.bar</a> ...which is why I said we should also add an exemption for ://
This is fixed in CVS from what I can see
> This is fixed in CVS from what I can see No it's not, maybe you don't have a :/ emoticon
I just compiled KDE 3.2 RC1 and everything seems to work perfectly. But I also discovered that the :/ emoticon is gone. Which emoticon set contains the :/, I would like to test this.
i'm using the "boxed" emoticons. (and kde 3.2 RC1)
Using the boxed set, I can see that the problem is still there in 3.2 RC1.
I don't think that making a special case for :/ is a good idea. Even though I can't find an example right now, it might be possible (maybe when new emoticons are added), that parts of an url contain them as well. For instance 8-P is a candidate for this. Adding other protocols (like edonkey-links,...) could make this problem reappear as well.
Maybe we can just omit the "magic url string" '://' inside the regexp?
CVS commit by mklingens: Forward port the fix for the ':/' in URIs gets replaced by an emoticon bug and the associated changes to the regression test. CCMAIL: 69964-done@bugs.kde.org M +34 -36 private/kopeteemoticons.cpp 1.17 M +10 -7 tests/kopeteemoticontest.cpp 1.2