FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18155&edit=1

ID: 18155
Updated by: mmalone@nutshell.com
Reported By: mmalone at nutshell dot com
Summary: Value strings inside arrays are not escaped
Status: Open
Type: Bug
Package: File_IMC
Operating System: Mac OS X
Package Version: SVN
PHP Version: 5.3.3
Roadmap Versions:
New Comment:

The last line of the test script should
var_dump($cardinfo['VCARD'][0]['ADR'][0]['value'][File_IMC::VCARD_ADR_STREET]);


Previous Comments:
------------------------------------------------------------------------

[2010-12-28 21:12:29] masonm

Added #patch bug:18155;patch:fix;revision:1293570749;.

------------------------------------------------------------------------

[2010-12-28 21:09:41] masonm

Description:
------------
The File_IMC_Parse_Vcard class is supposed to unescape strings inside
vCards, but it fails for strings inside arrays due to a due a bug in the
File_IMC_Parse->_unescape method.

Test script:
---------------
<?
$testVcard = '
BEGIN:VCARD
VERSION:3.0
N:Someone;Someone;;;
FN:Someone
ADR;type=WORK;type=pref:;;22221 W\, Unit 3;Somewhere;IL;60002;
END:VCARD
';
require_once 'File/IMC.php';
$parse = File_IMC::parse('vCard');
$cardinfo = $parse->fromText($testVcard);

var_dump($cardinfo['VCARD'][0]['ADR']);
?>

Expected result:
----------------
array(1) {
[0]=>
string(16) "22221 W, Unit 3"
}

Actual result:
--------------
array(1) {
[0]=>
string(16) "22221 W\, Unit 3"
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 28, '10 at 8:12p
activeDec 28, '10 at 8:12p
posts1
users1
websitepear.php.net

1 user in discussion

Mmalone: 1 post

People

Translate

site design / logo © 2022 Grokbase