From a8c3432aac1fadb402582fddf5626e551c3099a8 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 20 May 2024 15:36:47 -0400 Subject: [PATCH] Apply suggestions from code review --- changes/1746.bugfix.rst | 3 +-- src/briefcase/integrations/cookiecutter.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/changes/1746.bugfix.rst b/changes/1746.bugfix.rst index d897795d9..0c9d3a96f 100644 --- a/changes/1746.bugfix.rst +++ b/changes/1746.bugfix.rst @@ -1,2 +1 @@ -TOMLEscape class was fixed to properly escape doublequotes and backslash and the test files were corrected accordingly. -Now author creation can include single and double quotes at the time of creation +Escaping of quotation marks in TOML templates was corrected. diff --git a/src/briefcase/integrations/cookiecutter.py b/src/briefcase/integrations/cookiecutter.py index 10576b1f9..3c66ffd06 100644 --- a/src/briefcase/integrations/cookiecutter.py +++ b/src/briefcase/integrations/cookiecutter.py @@ -61,8 +61,7 @@ def __init__(self, environment): super().__init__(environment) def escape_toml(obj): - """Escapes string to match toml string requirements - https://toml.io/en/ v1.0.0#string.""" + """Escapes double quotes and backslashes.""" return obj.replace("\\", "\\\\").replace('"', '\\"') def escape_non_ascii(obj):