im.pidgin.pidgin.custom_smiley: 857f501405d270261689deef43795647f558538a
sadrul at pidgin.im
sadrul at pidgin.im
Tue Feb 19 15:05:58 EST 2008
-----------------------------------------------------------------
Revision: 857f501405d270261689deef43795647f558538a
Ancestor: ed5bd8463124599c850e332cc9ce5425149c59b0
Author: sadrul at pidgin.im
Date: 2008-02-19T19:51:03
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/857f501405d270261689deef43795647f558538a
Modified files:
libpurple/util.c
ChangeLog:
Revert some bits of the earlier patch not related to custom smileys.
-------------- next part --------------
============================================================
--- libpurple/util.c cbc46b37d4db55fa7e7ddc6542f1ef7354451df3
+++ libpurple/util.c a8bca1243be4bd1af50761ac263334a690f51033
@@ -921,6 +921,7 @@ purple_markup_unescape_entity(const char
{
const char *pln;
int len, pound;
+ char temp[2];
if (!text || *text != '&')
return NULL;
@@ -943,8 +944,10 @@ purple_markup_unescape_entity(const char
pln = "\302\256"; /* or use g_unichar_to_utf8(0xae); */
else if(IS_ENTITY("'"))
pln = "\'";
- else if(*(text+1) == '#' && (sscanf(text, "&#%u;", £) == 1) &&
- pound != 0 && *(text+3+(gint)log10(pound)) == ';') {
+ else if(*(text+1) == '#' &&
+ (sscanf(text, "&#%u%1[;]", £, temp) == 2 ||
+ sscanf(text, "&#x%x%1[;]", £, temp) == 2) &&
+ pound != 0) {
static char buf[7];
int buflen = g_unichar_to_utf8((gunichar)pound, buf);
buf[buflen] = '\0';
More information about the Commits
mailing list