Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52275 - GAIM - MSN - newlines in outgoing messages are not handled properly. fix supplied.
Summary: GAIM - MSN - newlines in outgoing messages are not handled properly. fix sup...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gaim Bugs Crew
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-28 09:28 UTC by Benjamin YATES
Modified: 2004-06-07 03:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin YATES 2004-05-28 09:28:50 UTC
the gtkhtml system inserts <br> into the string as you are typing and using newline (ctrl-enter in my case).  the msn protocol plugin passes the message text through msn/utils.c function that converts some common html formatting into MSN compatible ones, but <br> has no handler and ends up filtered out completely.



--- work/gaim-0.77/src/protocols/msn/utils.c    2004-04-17 23:27:33.000000000 -0400
+++ /utils.c    2004-05-28 11:56:17.369701016 -0400
@@ -185,7 +185,13 @@
        {
                if (*c == '<')
                {
-                       if (!g_ascii_strncasecmp(c + 1, "i>", 2))
+      if (!g_ascii_strncasecmp(c + 1, "br>", 3))
+      {
+        msg[retcount++] = '\r';
+        msg[retcount++] = '\n';
+        c += 4;
+      }
+                       else if (!g_ascii_strncasecmp(c + 1, "i>", 2))
                        {
                                strcat(fonteffect, "I");
                                c += 3;

the gaim ebuild told me over and over not to send bugs to gaim.  don't understand that, but after waiting for each step of the ebuild process while i debugged and tested this, i figured i'd follow along.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Don Seiler (RETIRED) gentoo-dev 2004-05-28 10:52:44 UTC
http://cvs.sourceforge.net/viewcvs.py/gaim/gaim/src/protocols/msn/utils.c?r1=1.16&r2=1.17

That patch is already upstream in Gaim's CVS.  Gaim-0.78 should be out in the next couple of days so I'm going to hold off on this for now.

The reason that users are supposed to file bugs with the distro first are laid out here:

http://forums.gentoo.org/viewtopic.php?p=1019166#1019166

It proves especially true here since you submitted a patch that was already in their CVS and would have wasted both yours and their time.
Comment 2 Amiran 2004-05-31 10:31:59 UTC
i have emerge gaim 0.78 today and it didn't work, the newline is not included and when i tried to emerge it with the patch it didn't work nither... :\
Comment 3 Benjamin YATES 2004-05-31 10:45:09 UTC
0.78 contains the exact same code as i added, and i verfied that newlines are working fine.
Comment 4 Amiran 2004-05-31 13:02:19 UTC
weird, that doesn;t work for me... :\
and i checked, i have the last version, did emerge sync emerged the newest version but no newlines on massages :\