[kopete-bugs] [Bug 163302] message in popup notification is empty when receiving a message with only a smiley

Dennis Nienhüser earthwings at gentoo.org
Tue Jul 8 22:05:00 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=163302         
earthwings gentoo org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|kopete-bugs kde org         |earthwings gentoo org
             Status|NEW                         |ASSIGNED



------- Additional Comments From earthwings gentoo org  2008-07-08 22:04 -------
The image preview plugin does turn the message into html, which is then stripped by the message popup. This will happen generally if any plugin transforms the message into html.

Below is a workaround for the picture preview plugin which I'll commit once trunk is open again.

--- a/kopete/plugins/urlpicpreview/urlpicpreviewplugin.cpp
+++ b/kopete/plugins/urlpicpreview/urlpicpreviewplugin.cpp
 @ -79,8 +79,14  @ void URLPicPreviewPlugin::aboutToDisplay ( Kopete::Message& message )
        {
                // reread configuration
                URLPicPreviewConfig::self()->readConfig();
-               // prepare parsed message body
-               message.setHtmlBody ( prepareBody ( message.parsedBody() ) );
+
+               QRegExp ex ( "(<a href=\")([^\"]*)(\" )?([^<]*)(</a>)(.*)$" );
+               QString myParsedBody = message.parsedBody();
+               if ( ex.indexIn ( myParsedBody ) != -1 )
+               {
+                       // Only change message if it contains urls
+                       message.setHtmlBody ( prepareBody ( myParsedBody ) );
+               }
        }
 }


More information about the kopete-bugs mailing list