Skip to content

Fix decoding single quote within double-quoted string in action/function parameter alias - #1783

Merged
gathogojr merged 4 commits into
OData:masterfrom
gathogojr:fix/2051-decoding-single-quote-within-double-quoted-string
May 21, 2020
Merged

gathogojr merged 4 commits into
OData:masterfrom
gathogojr:fix/2051-decoding-single-quote-within-double-quoted-string

Conversation

@gathogojr

Copy link
Copy Markdown
Contributor

Issues

This pull request fixes issue reported on OData Web API project OData/WebApi#2051.

Description

Fixes decoding of single quote within a double-quoted string in action/function parameter alias, e.g. http://ServiceRoot/UnboundFunction(param=@p)?@p={"@odata.type":"%23NS.Film","Id":1,"Title":"The Ogre's Lair"}

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

Additional work necessary

If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.

}

[Fact]
public void ParsePath_AliasInUnboundFunction_SingleAndEscapedDoubleQuotesWithinDoubleQuotedString()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems to me like these tests could be DRY'd since the logic is the same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@odero Fixed

@marabooy marabooy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@xuzhg xuzhg left a comment

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.

:shipit:

@gathogojr
gathogojr force-pushed the fix/2051-decoding-single-quote-within-double-quoted-string branch from f618188 to 6550bea Compare May 20, 2020 18:47
@gathogojr gathogojr added the Ready for review Use this label if a pull request is ready to be reviewed label May 20, 2020
@gathogojr
gathogojr force-pushed the fix/2051-decoding-single-quote-within-double-quoted-string branch from 6550bea to 46eb5cf Compare May 21, 2020 06:09
@gathogojr
gathogojr merged commit 90cf738 into OData:master May 21, 2020
@gathogojr
gathogojr deleted the fix/2051-decoding-single-quote-within-double-quoted-string branch May 21, 2020 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for review Use this label if a pull request is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants