Handle legacy libraries with escaped symbol names.

Fixes https://gitlab.com/kicad/code/kicad/issues/14057
This commit is contained in:
Jeff Young
2023-04-15 17:47:32 +01:00
parent d4b4abd001
commit b74d964bff
3 changed files with 10 additions and 2 deletions
+5 -2
View File
@@ -159,9 +159,12 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
else
converted += c;
}
else if( aContext == CTX_LIBID )
else if( aContext == CTX_LIBID || aContext == CTX_LEGACY_LIBID )
{
if( c == '\\' )
// We no longer escape '/' in LIB_IDs, but we used to
if( c == '/' && aContext == CTX_LEGACY_LIBID )
converted += wxT( "{slash}" );
else if( c == '\\' )
converted += wxT( "{backslash}" );
else if( c == '<' )
converted += wxT( "{lt}" );