[#1424] bad url decoding
Summary bad url decoding
Queue IMP
Queue Version 4.0.2
Type Bug
State Resolved
Priority 1. Low
Owners
Requester m (dot) zdila (at) episoftware (dot) com
Created 02/22/2005 (1284 days ago)
Due
Updated 03/06/2005 (1272 days ago)
Assigned
Resolved 03/06/2005 (1272 days ago)
Attachments
Milestone
Patch No

History
03/06/2005 Jan Schneider Comment #2
State ⇒ Resolved
Reply to this comment
Fixed in CVS and 4.0.3.
02/22/2005 m (dot) zdila (at) episoftware (dot) com Comment #1
Queue ⇒ IMP
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ bad url decoding
Reply to this comment
Problem:
1. Mail->Compose->Address Book
2. select name "Martin Ždila"
3. press [To >>] (in the left pane is "Martin Ždila")
4. press [Search]
5. in the left pane is "Martin %u017Ddila"

Solution:
in contacts.php
1. add:

function unicode_decode($txt) {
         $txt = ereg_replace('%u0([[:alnum:]]{3})', '&#x\1;',$txt);
         $txt = ereg_replace('%([[:alnum:]]{2})', '&#x\1;',$txt);
         return $txt;
}

2. replace line:
$selected_addresses[$a[0]] = $a[1];
to:
$selected_addresses[unicode_decode($a[0])] = unicode_decode($a[1]);