db-migrate / db-migrate/db-migrate-base
Escape doesn't escape anything at all when using double quotes
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/db-migrate/db-migrate-base/blob/05762f395e43643c2e9a1641e7b2a9492f34ae5a/index.js#L682
```js
return str.replace(/"/g, '"');
```
The replacement string was probably meant to be `'\\"'`.
The code should be
```js
return str.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
```
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42468457-escape-doesn-t-escape-anything-at-all-when-using-double-quotes?utm_campaign=plugin&utm_content=tracker%2F11792942&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F11792942&utm_medium=issues&utm_source=github).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.