A bit more safety around control characters in strings.
This commit is contained in:
parent
83a02e18eb
commit
1ac6cbc4a6
|
@ -57,6 +57,8 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
{
|
||||
if( c == '/' )
|
||||
converted += "{slash}";
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += ""; // drop
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
|
@ -66,6 +68,8 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
converted += "{brace}";
|
||||
else if( c == ':' )
|
||||
converted += "{colon}";
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += ""; // drop
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue