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

Correctly escape escape characters in String.Contains(), String.StartsWith() and String.EndsWith() translations if pattern doesn't contain wildcards. #1951

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

lauxjpn
Copy link
Collaborator

@lauxjpn lauxjpn commented Dec 8, 2024

The String.Contains(), String.StartsWith() and String.EndsWith() translations only escaped the \ escape char correctly, if the pattern also contained at least one wildcard character (% or _).

Now, escape characters are always escaped (or at least as long as NO_BACKSLASH_ESCAPES is not used; this would probably break our current implementations).

Fixes #1943

@lauxjpn lauxjpn added this to the 9.0.0-alpha.1 milestone Dec 8, 2024
@lauxjpn lauxjpn self-assigned this Dec 8, 2024
…rtsWith()` and `String.EndsWith()` translations if pattern doesn't contain wildcards.
@lauxjpn lauxjpn merged commit 1ca1b23 into PomeloFoundation:main Dec 8, 2024
19 checks passed
@lauxjpn lauxjpn deleted the fix/issue1943 branch December 8, 2024 21:50
@lauxjpn lauxjpn modified the milestones: 9.0.0-alpha.1, 9.0.0-preview.2.efcore.9.0.0 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backslashes are not always escaped when String.Contains is translated to LIKE
1 participant