diff --git a/common/string.cpp b/common/string.cpp index 31d7715f7e..bafc0abae5 100644 --- a/common/string.cpp +++ b/common/string.cpp @@ -82,15 +82,9 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext ) else converted += c; } - else if( aContext == CTX_DELIMITED_STR ) + else if( aContext == CTX_LINE ) { - if( c == '{' ) - converted += "{brace}"; - else if( c == ' ' ) - converted += "{space}"; - else if( c == '\t' ) - converted += "{tab}"; - else if( c == '\n' || c == '\r' ) + if( c == '\n' || c == '\r' ) converted += "{return}"; else converted += c; diff --git a/include/kicad_string.h b/include/kicad_string.h index 504d780867..692ec505b6 100644 --- a/include/kicad_string.h +++ b/include/kicad_string.h @@ -47,7 +47,7 @@ enum ESCAPE_CONTEXT CTX_NETNAME, CTX_LIBID, CTX_QUOTED_STR, - CTX_DELIMITED_STR, + CTX_LINE, CTX_FILENAME }; diff --git a/pcbnew/footprint_info_impl.cpp b/pcbnew/footprint_info_impl.cpp index 02fc5e8703..2eb81df41d 100644 --- a/pcbnew/footprint_info_impl.cpp +++ b/pcbnew/footprint_info_impl.cpp @@ -359,8 +359,8 @@ void FOOTPRINT_LIST_IMPL::WriteCacheToFile( wxTextFile* aCacheFile ) { aCacheFile->AddLine( fpinfo->GetLibNickname() ); aCacheFile->AddLine( fpinfo->GetName() ); - aCacheFile->AddLine( EscapeString( fpinfo->GetDescription(), CTX_DELIMITED_STR ) ); - aCacheFile->AddLine( EscapeString( fpinfo->GetKeywords(), CTX_DELIMITED_STR ) ); + aCacheFile->AddLine( EscapeString( fpinfo->GetDescription(), CTX_LINE ) ); + aCacheFile->AddLine( EscapeString( fpinfo->GetKeywords(), CTX_LINE ) ); aCacheFile->AddLine( wxString::Format( "%d", fpinfo->GetOrderNum() ) ); aCacheFile->AddLine( wxString::Format( "%u", fpinfo->GetPadCount() ) ); aCacheFile->AddLine( wxString::Format( "%u", fpinfo->GetUniquePadCount() ) );