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

[yesod-test] quote character not matching in bodyContains #1787

Open
eahlberg opened this issue Oct 11, 2022 · 0 comments
Open

[yesod-test] quote character not matching in bodyContains #1787

eahlberg opened this issue Oct 11, 2022 · 0 comments

Comments

@eahlberg
Copy link
Contributor

eahlberg commented Oct 11, 2022

I noticed that bodyContains (probably bodyEquals as well, but haven't confirmed) fails when matching quotes ('), e.g.. bodyContains "O'Connor". A similar issue was described and fixed for htmlContain* in #1768.

However, fixing this by escaping the input string raises the same issue as described in #1784 but for bodyContains etc, namely that there's no way to match strings verbatim, which I think is a valid use case. Therefore, it might make sense to add functions which match strings verbatim in a similar manner, e.g. bodyContainsPreEscaped etc.

This is easily solved locally but the fact that htmlContain* escapes input by default which bodyContains does not is a bit confusing.

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

No branches or pull requests

1 participant