From 412368b7f9d09ed12cf6ae5919aeb570ff8fc198 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 15 Mar 2023 09:31:49 +0100 Subject: [PATCH] PDF plotter: encode the letters ( and ) in strings with context CTX_JS_STR They are separators and cannot be used in user strings. Fixes #14302 https://gitlab.com/kicad/code/kicad/issues/14302 --- common/string_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/string_utils.cpp b/common/string_utils.cpp index a79b4dbbea..6b972e7e3c 100644 --- a/common/string_utils.cpp +++ b/common/string_utils.cpp @@ -196,7 +196,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext ) } else if( aContext == CTX_JS_STR ) { - if( c >= 0x7F || c == '\'' || c == '\\' ) + if( c >= 0x7F || c == '\'' || c == '\\' || c == '(' || c == ')' ) { unsigned int code = c; char buffer[16];