[Pkg-owncloud-commits] [php-sabre-vobject] 223/341: We must escape commas from URI.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:50 UTC 2015


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 ee653cdffbe0c6f8fb025f12e02eed64efd336e7
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Tue Jan 27 12:11:26 2015 +0100

    We must escape commas from URI.
---
 lib/Property/Uri.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/Property/Uri.php b/lib/Property/Uri.php
index d71b27e..b5d8c23 100644
--- a/lib/Property/Uri.php
+++ b/lib/Property/Uri.php
@@ -72,7 +72,7 @@ class Uri extends Text {
             }
             $this->value = $newVal;
         } else {
-            $this->value = $val;
+            $this->value = strtr($val, ['\,' => ',']);
         }
 
     }
@@ -85,11 +85,13 @@ class Uri extends Text {
     public function getRawMimeDirValue() {
 
         if (is_array($this->value)) {
-            return $this->value[0];
+            $value = $this->value[0];
         } else {
-            return $this->value;
+            $value = $this->value;
         }
 
+        return strtr($value, [',' => '\,']);
+
     }
 
 }

-- 
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