[Pidgin] #11242: Extra <SPAN> for RTL languages - Patch to Tickets #10961 & #10988

Pidgin trac at pidgin.im
Sat Jan 23 10:36:26 EST 2010


#11242: Extra <SPAN> for RTL languages - Patch to Tickets #10961 & #10988
---------------------------------+------------------------------------------
 Reporter:  Fartash              |     Owner:  sulabh.dev
     Type:  patch                |    Status:  new       
Component:  Yahoo!/Yahoo! JAPAN  |   Version:  2.6.5     
 Keywords:  RTL span             |  
---------------------------------+------------------------------------------
 In "yahoo_html_to_codes()" function which is written in
 "libpurple/protocols/yahoo/util.c" there is a new else branch to the
 inside if-else block, which picks any unknown tag and sends it the same as
 it is. In our case this else will cause the <span> tag added by pidgin
 itself by writing in RTL languages to be sent.

 There is two solutions for this problem: 1. Add a new else-if branch to
 pick any span tag and ignore it. 2. Remove the else tag completely.

 I've considered first solution in my patch.

 The reason for this bug is that a <span> tag will be escaped by yahoo and
 sent to the other side the same. In Pidgin when we type in an RTL
 language, the text gets surrounded with <SPAN style="direction:rtl;text-
 align:right;"></SPAN>. In 2.6.3 and older versions, the result string will
 be sent without the span tag but in 2.6.4 and 2.6.5 there is an
 exceptional branch added for unknown tags, which sends them the same as
 they are and that makes our problem.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/11242>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list