From c42050a10cac40b0b5ac70c587e07f257a9b50dd Mon Sep 17 00:00:00 2001 From: Jonathan Strine Date: Wed, 25 Nov 2020 19:31:51 -0500 Subject: [PATCH 1/4] Escape characters which cause XML parsing issues --- osxphotos/templates/xmp_sidecar.mako | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osxphotos/templates/xmp_sidecar.mako b/osxphotos/templates/xmp_sidecar.mako index f34c1b9b..16ebc651 100644 --- a/osxphotos/templates/xmp_sidecar.mako +++ b/osxphotos/templates/xmp_sidecar.mako @@ -12,7 +12,7 @@ % if desc is None: % else: - ${desc} + ${desc | x} % endif @@ -20,7 +20,7 @@ % if title is None: % else: - ${title} + ${title | x} % endif @@ -30,7 +30,7 @@ % for subj in subject: - ${subj} + ${subj | x} % endfor @@ -48,7 +48,7 @@ % for person in persons: - ${person} + ${person | x} % endfor @@ -60,7 +60,7 @@ % for keyword in keywords: - ${keyword} + ${keyword | x} % endfor From aafdbea5645819bb8e62dd1dfa267f28a6ee6e94 Mon Sep 17 00:00:00 2001 From: Jonathan Strine Date: Wed, 25 Nov 2020 19:36:09 -0500 Subject: [PATCH 2/4] Fix test to accomodate for escaped apostrophe --- tests/test_export_catalina_10_15_7.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_export_catalina_10_15_7.py b/tests/test_export_catalina_10_15_7.py index 2d9c2e7a..391b09bc 100644 --- a/tests/test_export_catalina_10_15_7.py +++ b/tests/test_export_catalina_10_15_7.py @@ -1055,7 +1055,7 @@ def test_xmp_sidecar_gps(): London United Kingdom London 2018 - St. James's Park + St. James's Park From d0d2e8080096bf66f93a830386800ce713680c51 Mon Sep 17 00:00:00 2001 From: Jonathan Strine Date: Wed, 25 Nov 2020 19:45:21 -0500 Subject: [PATCH 3/4] Fix tests for apostrophe Previous commit didn't reflect all locations and had a copy/paste error. --- tests/test_export_catalina_10_15_7.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_export_catalina_10_15_7.py b/tests/test_export_catalina_10_15_7.py index 391b09bc..5ad2d558 100644 --- a/tests/test_export_catalina_10_15_7.py +++ b/tests/test_export_catalina_10_15_7.py @@ -1029,7 +1029,7 @@ def test_xmp_sidecar_gps(): xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"> jpg - St. James's Park + St. James's Park @@ -1038,7 +1038,7 @@ def test_xmp_sidecar_gps(): London United Kingdom London 2018 - St. James's Park + St. James's Park 2018-10-13T09:18:12.501000-04:00 @@ -1055,7 +1055,7 @@ def test_xmp_sidecar_gps(): London United Kingdom London 2018 - St. James's Park + St. James''s Park From cec266bba4072a1921d499660fedaaa0bd4b763a Mon Sep 17 00:00:00 2001 From: Jonathan Strine Date: Wed, 25 Nov 2020 19:51:09 -0500 Subject: [PATCH 4/4] Fix tests again Third times the charm to fix a find-replace error this time. --- tests/test_export_catalina_10_15_7.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_export_catalina_10_15_7.py b/tests/test_export_catalina_10_15_7.py index 5ad2d558..92222c4e 100644 --- a/tests/test_export_catalina_10_15_7.py +++ b/tests/test_export_catalina_10_15_7.py @@ -1055,7 +1055,7 @@ def test_xmp_sidecar_gps(): London United Kingdom London 2018 - St. James''s Park + St. James's Park