Skip to content

Issue #567: Escape character , for example ('/') is not proper handle at key or function in quoted string - #572

Merged
xuzhg merged 1 commit into
mainfrom
issue567
Apr 21, 2022
Merged

Issue #567: Escape character , for example ('/') is not proper handle at key or function in quoted string#572
xuzhg merged 1 commit into
mainfrom
issue567

Conversation

@xuzhg

@xuzhg xuzhg commented Apr 21, 2022

Copy link
Copy Markdown
Member

#567

When send a request contains the escaped string in the string key or function parameter as follows
Get: /People(FirstName='Goods',LastName='Zha%2Fngg')

We should unescape it before going to the parsing step.

{
string strValue = rawValue as string;
string newStrValue = context.GetParameterAliasOrSelf(strValue);
newStrValue = Uri.UnescapeDataString(newStrValue);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible with something like an open type for a property to be named with a character that needs to be escaped/unescaped? I'm really wondering if this new unescape logic should be applied to all segments, not just key and function segments

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not possible because the property name is an identifier, and an identifier should be a simple string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants