From d5b8e4928ca31059408e1d393bb57bc34c207c5a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 28 Dec 2019 13:26:46 +0100 Subject: [PATCH] Gerber P&P files: escape the double quote char inside user strings. This is a reserved char, used to quote user strings --- common/gbr_metadata.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/gbr_metadata.cpp b/common/gbr_metadata.cpp index 49aba7c766..8e0f2e45b7 100644 --- a/common/gbr_metadata.cpp +++ b/common/gbr_metadata.cpp @@ -403,7 +403,7 @@ wxString ConvertNotAllowedCharsInGerber( const wxString& aString, bool aAllowUtf * 16 bits sequence unicode * However if aAllowUtf8Chars is true only unautorized codes will be escaped, because some * Gerber files accept UTF8 chars. - * unautorized codes are ',' '*' '%' '\' and are used as separators in Gerber files + * unautorized codes are ',' '*' '%' '\' '"' and are used as separators in Gerber files */ wxString txt; @@ -424,6 +424,11 @@ wxString ConvertNotAllowedCharsInGerber( const wxString& aString, bool aAllowUtf convert = true; break; + case '"': + if( aQuoteString ) + convert = true; + break; + default: break; }