[Pkg-owncloud-commits] [php-sabre-vobject] 11/16: Yahoo sometimes emits URLS as QUOTED-PRINTABLE.

David Prévot taffit at moszumanska.debian.org
Mon Jul 21 19:19:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 254675c6124359a39cbd869ffc4df8236fa4edbf
Author: Evert Pot <me at evertpot.com>
Date:   Mon Jul 14 13:59:00 2014 -0400

    Yahoo sometimes emits URLS as QUOTED-PRINTABLE.
    
    Fixes #96
---
 ChangeLog.md                        | 1 +
 lib/Sabre/VObject/Property/Uri.php  | 2 +-
 tests/Sabre/VObject/Issue96Test.php | 8 ++++----
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ChangeLog.md b/ChangeLog.md
index 2efb374..d08e419 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -6,6 +6,7 @@ ChangeLog
 
 * Added: Issue #98. The VCardConverter now takes `X-APPLE-OMIT-YEAR` into
   consideration when converting between vCard 3 and 4.
+* Fixed: Issue #96. Some support for Yahoo's broken vcards.
 * Fixed: PHP 5.3 support was broken in the cli tool.
 
 
diff --git a/lib/Sabre/VObject/Property/Uri.php b/lib/Sabre/VObject/Property/Uri.php
index 2b782ff..ee3e869 100644
--- a/lib/Sabre/VObject/Property/Uri.php
+++ b/lib/Sabre/VObject/Property/Uri.php
@@ -13,7 +13,7 @@ use Sabre\VObject\Property;
  * @author Evert Pot (http://evertpot.com/)
  * @license http://sabre.io/license/ Modified BSD License
  */
-class Uri extends Property {
+class Uri extends Text {
 
     /**
      * In case this is a multi-value property. This string will be used as a
diff --git a/tests/Sabre/VObject/Issue96Test.php b/tests/Sabre/VObject/Issue96Test.php
index 5d4b6cf..4300b86 100644
--- a/tests/Sabre/VObject/Issue96Test.php
+++ b/tests/Sabre/VObject/Issue96Test.php
@@ -10,14 +10,14 @@ class Issue96Test extends \PHPUnit_Framework_TestCase {
 BEGIN:VCARD
 VERSION:2.1
 SOURCE:Yahoo Contacts (http://contacts.yahoo.com)
-URL;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE: =
-http&#92;://www.example.org
+URL;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:=
+http://www.example.org
 END:VCARD
 VCF;
 
-        $vcard = Reader::read($input);
+        $vcard = Reader::read($input, Reader::OPTION_FORGIVING);
         $this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard);
-        $this->assertEquals("http://www.example.org", $this->getPropertyValue($vcard->url));
+        $this->assertEquals("http://www.example.org", $vcard->url->getValue());
 
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list