pidgin: 071f9041: Fix sending /buzz on yahoo.
sadrul at pidgin.im
sadrul at pidgin.im
Tue Oct 6 11:55:40 EDT 2009
-----------------------------------------------------------------
Revision: 071f90416f664b41b4426e7929dc0a595aa02127
Ancestor: b4458fccbc3c9ab0c1c9105eb68c47ffa7c62e5a
Author: sadrul at pidgin.im
Date: 2009-10-06T15:56:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/071f90416f664b41b4426e7929dc0a595aa02127
Modified files:
ChangeLog libpurple/protocols/yahoo/util.c
libpurple/tests/test_yahoo_util.c
ChangeLog:
Fix sending /buzz on yahoo.
Yahoo buzzes are '<ding>' sent as normal IMs. 'ding' is an unknown tag,
and we were stripping unknown tags. So instead, send the tags we don't
recognize as they are without stripping/changing them.
... or perhaps we could treat 'ding' as a known tag instead?
Added test cases.
-------------- next part --------------
============================================================
--- ChangeLog 4c1abda79453a8bf0bc201e02b26747faa64a088
+++ ChangeLog 07fe73dde2b7ac54fda38dc60347be4994e15968
@@ -7,6 +7,9 @@ version 2.6.3 (??/??/20??):
is specified.
* Fix a crash when adding a buddy without an '@'.
+ Yahoo:
+ * Fix sending /buzz.
+
General:
* New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins')
to announce the list of loaded plugins (in both Finch and Pidgin).
============================================================
--- libpurple/protocols/yahoo/util.c 7996c11dc9a1e9bbbb55c890471cef616237f4a0
+++ libpurple/protocols/yahoo/util.c 736709dedbe21eed260448b00cc80441f63f8227
@@ -881,6 +881,9 @@ char *yahoo_html_to_codes(const char *sr
}
g_free(etag);
}
+ } else {
+ /* We don't know what the tag is. Send it unmodified. */
+ g_string_append(dest, tag);
}
i = j;
============================================================
--- libpurple/tests/test_yahoo_util.c 264fbddc917581fac21b93597df09ad34cd94059
+++ libpurple/tests/test_yahoo_util.c 9c3b13ee9ae0356264c378663f1474df48ad777c
@@ -180,6 +180,12 @@ START_TEST(test_html_to_codes)
assert_string_equal_free("\x1B[1mbold \x1B[#FF0000mred <font face=\"Comic Sans MS\" size=\"20\">larger \x1B[#000000mbacktoblack <font size=\"12\">normalsize</font>\x1B[#FF0000m</font>\x1B[#000000m\x1B[x1m",
yahoo_html_to_codes("<b>bold <font color=\"#FF0000\">red <font face=\"Comic Sans MS\" size=\"5\">larger <font color=\"#000000\">backtoblack <font size=\"3\">normalsize</font></font></font></font></b>"));
+
+ /* buzz/unknown tags */
+ assert_string_equal_free("<ding>",
+ yahoo_html_to_codes("<ding>"));
+ assert_string_equal_free("Unknown <tags>",
+ yahoo_html_to_codes("Unknown <tags>"));
}
END_TEST
More information about the Commits
mailing list