im.pidgin.pidgin: 40d42b30664156f7f561606dd28fc01256a8ca36
sadrul at pidgin.im
sadrul at pidgin.im
Thu Dec 6 07:38:05 EST 2007
-----------------------------------------------------------------
Revision: 40d42b30664156f7f561606dd28fc01256a8ca36
Ancestor: b3b98e439c48cd619900e0a659b87d34d8476780
Author: sadrul at pidgin.im
Date: 2007-12-06T12:26:40
Branch: im.pidgin.pidgin
Modified files:
COPYRIGHT libpurple/util.c
ChangeLog:
Patch #3848 from Eion Robb: "purple_markup_unescape_entity doesn't escape hexadecimal references", with changes from QuLogic.
Closes #3848.
-------------- next part --------------
============================================================
--- COPYRIGHT cc1f3eb828fb6bec6383b0a0038d0155578dc94a
+++ COPYRIGHT 6eeb6ec23cdb928cdde590dd2e3f97f3b7d11c40
@@ -309,6 +309,7 @@ Lee Roach
Tim Ringenbach
Dennis Ristuccia
Lee Roach
+Eion Robb
Rhett Robinson
Luciano Miguel Ferreira Rocha
Andrew Rodland
============================================================
--- libpurple/util.c 731485e99d122b13965175e9911a3e31ecc20164
+++ libpurple/util.c a03c8c18a2d8a6d40b8b65a7f9b709930def59d5
@@ -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,9 @@ 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