Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string escaping in src/System.Private.ServiceModel/src/Resources/Strings.resx #3186

Closed
mconnew opened this issue Sep 27, 2018 · 0 comments
Assignees
Labels
bug This is a product bug.

Comments

@mconnew
Copy link
Member

mconnew commented Sep 27, 2018

There's a bit of history with how the strings were handled in this repo as build tools and project systems evolved. When this code base was initially created, resource strings were moved to be in a json file. There was a code generation step where the literal resource strings were read, placed into quotes and emitted into generated code. This meant that the json file needed to have the text pre-escaped for C#. An example of this is the resource string UnableToResolveHost.

<value>Cannot resolve the host name of URI \"{0}\" using DNS.</value>

As the resource value is being parsed from XML, the resulting string contains a backslash followed by a quotation mark. This escape sequence is relevant when compiling code and shouldn't be in the resultant string object. The end result will be that you will see the escape sequence in output, e.g. if an exception is thrown and not caught, when the process is exiting it writes the exception message out to console. You will see the escape sequence on the console output.

@Lxiamail Lxiamail added this to the 3.0 milestone Oct 3, 2018
@Lxiamail Lxiamail added bug This is a product bug. 1 - Up next labels Nov 7, 2018
StephenBonikowsky added a commit to StephenBonikowsky/wcf that referenced this issue Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a product bug.
Projects
None yet
Development

No branches or pull requests

3 participants