diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-01 07:55:26 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-08-01 07:57:26 +0200 |
commit | a2c7f5c01f90da40b15fdf162a7db80d1032536d (patch) | |
tree | 8bcda82d5961a11e16bd79eef5463a0b39e9e2b1 /debian/patches | |
parent | 6c8c9e84e383d8d9748f4847c4a11bb75a0b73a5 (diff) |
vcard: Fix ORG fields with multiple components
Closes: #833108
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/vcard-Fix-ORG-fields-with-multiple-components.patch | 53 |
2 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series index 3cfdb10..cd993cb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-don-t-install-ics_diff.patch 0003-Treat-untils-as-floating.patch +vcard-Fix-ORG-fields-with-multiple-components.patch diff --git a/debian/patches/vcard-Fix-ORG-fields-with-multiple-components.patch b/debian/patches/vcard-Fix-ORG-fields-with-multiple-components.patch new file mode 100644 index 0000000..befb779 --- /dev/null +++ b/debian/patches/vcard-Fix-ORG-fields-with-multiple-components.patch @@ -0,0 +1,53 @@ +From: Markus Unterwaditzer <markus@unterwaditzer.net> +Date: Wed, 13 Apr 2016 22:43:39 +0200 +Subject: vcard: Fix ORG fields with multiple components + +--- + test_files/simple_3_0_test.ics | 2 +- + tests.py | 7 ++++++- + vobject/vcard.py | 1 + + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/test_files/simple_3_0_test.ics b/test_files/simple_3_0_test.ics +index d5e4642..1faf80d 100644 +--- a/test_files/simple_3_0_test.ics ++++ b/test_files/simple_3_0_test.ics +@@ -9,5 +9,5 @@ TEL;type=CELL:+01-(0)5-555.55.55 + ACCOUNT;type=HOME:010-1234567-05 + ADR;type=HOME:;;Haight Street 512\;\nEscape\, Test;Novosibirsk;;80214;Gnuland + TEL;type=HOME:+01-(0)2-876.54.32 +-ORG:University of Novosibirsk, Department of Octopus Parthenogenesis ++ORG:University of Novosibirsk;Department of Octopus Parthenogenesis + END:VCARD +diff --git a/tests.py b/tests.py +index 2073930..6b0fad9 100644 +--- a/tests.py ++++ b/tests.py +@@ -516,9 +516,14 @@ class TestVcards(unittest.TestCase): + #)
+ self.assertEqual(
+ card.org.value,
+- "University of Novosibirsk, Department of Octopus Parthenogenesis"
++ ["University of Novosibirsk", "Department of Octopus Parthenogenesis"]
+ )
+
++ for _ in range(3):
++ new_card = base.readOne(card.serialize())
++ self.assertEqual(new_card.org.value, card.org.value)
++ card = new_card
++
+
+ class TestIcalendar(unittest.TestCase):
+ """
+diff --git a/vobject/vcard.py b/vobject/vcard.py +index dd60b73..0aec844 100644 +--- a/vobject/vcard.py ++++ b/vobject/vcard.py +@@ -338,6 +338,7 @@ class OrgBehavior(VCardBehavior): + if obj.isNative: + return obj + obj.isNative = True ++ obj.value = splitFields(obj.value) + return obj + + @staticmethod |