[Pkg-owncloud-commits] [php-sabre-vobject] 256/341: Use an XML fragment instead of a hacky code.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:54 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 eb1471bce8df32532742156afaea6878644144e5
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Fri Jan 30 09:45:08 2015 +0100
Use an XML fragment instead of a hacky code.
---
lib/Component/VCard.php | 3 ++-
tests/VObject/Parser/XmlTest.php | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Component/VCard.php b/lib/Component/VCard.php
index 6777f5f..807fefd 100644
--- a/lib/Component/VCard.php
+++ b/lib/Component/VCard.php
@@ -476,7 +476,8 @@ class VCard extends VObject\Document {
case 'XML':
$value = $property->getParts();
- $writer->writeRaw(' ' . $value[0] . "\n ");
+ $fragment = new Xml\Element\XmlFragment($value[0]);
+ $writer->write($fragment);
break;
default:
diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index a4e59bc..4beae7b 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -1170,7 +1170,7 @@ XML
</parameters>
<unknown>alien.jpg</unknown>
</x-file>
- <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.example.com">My web page!</a>
+ <x1:a href="http://www.example.com" xmlns:x1="http://www.w3.org/1999/xhtml">My web page!</x1:a>
</vcard>
</vcards>
XML
--
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