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

Handle more than one single quote in string literals in a portable way #151

Merged
merged 2 commits into from
Feb 17, 2014
Merged

Conversation

szymonrw
Copy link
Contributor

Replace '' (two single quotes) with ' inside a string literal. Also handles more than one single quote (/'/ vs. /'/g).

Makes everything use the escape method from driver/base instead of inline .replace(…) calls in two places.

If merged, renders PR #143 obsolete.

I'm not sure if duplicating "insert" tests just to include single quotes inside title is a good idea. Maybe I should've added them to existing "insert" tests?

Make everything use the same method for escaping. It was couple of
inline `.replace` calls before (in base and mysql drivers).
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.

None yet

2 participants