ZEXSM / OData.QueryBuilder

OData.QueryBuilder - library for creating complex OData queries (OData version 4.01) based on data models with linq syntax.
MIT License
75 stars 31 forks source link

Fixed an issue where ampersands in string values were not escaped properly #24

Closed kingchad1989 closed 4 years ago

kingchad1989 commented 4 years ago

Essentially ran into the issue described in this post while using this library. Was able to fix the issue by escaping "&" to "%26". I don't believe any other characters should require escaping.

ZEXSM commented 4 years ago

Hi, I have not encountered such a problem yet, so I want to figure it out. We'll do the merge later, or I'll suggest the best possible solution.

Thank.

ZEXSM commented 4 years ago

So, I analyzed the problem. I understand why such replacements are needed and I can offer the following decision. Please look here PR

I see this in a separate function because it provides flexibility and is not done to convert each value.