Repository: claudep/swiss-qr-bill

Issue:
postfinance doesnt accept generated qr-code
Hi, our postfinance doesnt accept our generated qr-code because there are characters in line 30 that are not allowed (extra_infos, '##' character for visual line split). Is it possible to remove the character after line split (line 680 in bill.py)? Currently its readded after line split.  

Discussion:

Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index e03592e..d2906f1 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,10 @@
 ChangeLog
 =========
 
+Unreleased
+----------
+- Replaced ``##`` with ``//`` as separator in additional informations (#75).
+
 0.7.1 (2022-03-07)
 ------------------
 - Fixed bad position of amount rect on receipt part (#74).
diff --git a/qrbill/bill.py b/qrbill/bill.py
index 92b38b4..f9476e8 100644
--- a/qrbill/bill.py
+++ b/qrbill/bill.py
@@ -675,9 +675,9 @@ class QRBill:
 
         if self.extra_infos:
             add_header(self.label("Additional information"))
-            if '##' in self.extra_infos:
-                extra_infos = self.extra_infos.split('##')
-                extra_infos[1] = '##' + extra_infos[1]
+            if '//' in self.extra_infos:
+                extra_infos = self.extra_infos.split('//')
+                extra_infos[1] = '//' + extra_infos[1]
             else:
                 extra_infos = [self.extra_infos]
             # TODO: handle line breaks for long infos (mandatory 5mm margin)


Test patch:
diff --git a/tests/test_qrbill.py b/tests/test_qrbill.py
index 8e7a010..02339da 100644
--- a/tests/test_qrbill.py
+++ b/tests/test_qrbill.py
@@ -293,7 +293,7 @@ class QRBillTests(unittest.TestCase):
             },
             ref_number='210000000003139471430009017',
             extra_infos=(
-                'Order of 15.09.2019##S1/01/20170309/11/10201409/20/1400'
+                'Order of 15.09.2019//S1/01/20170309/11/10201409/20/1400'
                 '0000/22/36958/30/CH106017086/40/1020/41/3010'
             )
         )
@@ -311,7 +311,7 @@ class QRBillTests(unittest.TestCase):
             'Rue du Lac\r\n1268\r\n2501\r\nBiel\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'
             '1949.70\r\nCHF\r\nS\r\nPia-Maria Rutschmann-Schnyder\r\nGrosse Marktgasse\r\n'
             '28\r\n9400\r\nRorschach\r\nCH\r\nQRR\r\n210000000003139471430009017\r\n'
-            'Order of 15.09.2019##S1/01/20170309/11/10201409/20/14000000/22/36958/30/CH106017086'
+            'Order of 15.09.2019//S1/01/20170309/11/10201409/20/14000000/22/36958/30/CH106017086'
             '/40/1020/41/3010\r\nEPD'
         )
         with tempfile.NamedTemporaryFile(suffix='.svg') as fh: