nock 13.0.6 → 13.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/recorder.js +4 -0
- package/package.json +1 -1
package/lib/recorder.js
CHANGED
|
@@ -110,6 +110,10 @@ function generateRequestAndResponse({
|
|
|
110
110
|
const queryStr = req.path.slice(queryIndex + 1)
|
|
111
111
|
queryObj = querystring.parse(queryStr)
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
// Escape any single quotes in the path as the output uses them
|
|
115
|
+
path = path.replace(/'/g, `\\'`)
|
|
116
|
+
|
|
113
117
|
// Always encode the query parameters when recording.
|
|
114
118
|
const encodedQueryObj = {}
|
|
115
119
|
for (const key in queryObj) {
|