[Pidgin] #3848: purple_markup_unescape_entity doesn't escape hexadecimal references
Pidgin
trac at pidgin.im
Sun Nov 4 17:05:32 EST 2007
#3848: purple_markup_unescape_entity doesn't escape hexadecimal references
---------------------------+------------------------------------------------
Reporter: BigBrownChunx | Type: patch
Status: new | Priority: minor
Component: libpurple | Version: 2.2.2
Keywords: | Pending: 0
---------------------------+------------------------------------------------
The libpurple function purple_markup_unescape_entity() can convert
entities in the decimal form © but not in the hexadecimal form ©
The implications of this are that when using purple_markup_strip_html() to
convert Adium UTF-8 messages, the hexadecimal entities that it sends
aren't converted.
A solution to this is to convert
{{{
else if(*(text+1) == '#' && (sscanf(text, "&#%u;", £) == 1) &&
pound != 0 && *(text+3+(gint)log10(pound)) == ';')
{
}}}
to
{{{
else if(*(text+1) == '#' && ((sscanf(text, "&#%u;", £) == 1) ||
(sscanf(text, "&#x%x;", £) == 1)) &&
pound != 0 && *(text+3+(gint)log10(pound)) == ';')
{
}}}
(on line 928 in util.c)
--
Ticket URL: <http://developer.pidgin.im/ticket/3848>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list