Skip to content
Permalink
Browse files

Sanitize the image name from the `/` character (#181)

  • Loading branch information...
ncounter authored and gkushang committed Jun 8, 2019
1 parent e382113 commit 5846ab72c9ad3f1b3b38c9792f9a27c1d34e45d5
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/reporter.js
@@ -263,7 +263,7 @@ var generateReport = function (options) {
if ((options.storeScreenshots && options.storeScreenshots === true) ||
(options.storeScreenShots && options.storeScreenShots === true)) {

var name = sanitize(step.name || step.keyword, /[^a-zA-Z0-9/-]+/g); // Only allow URL-friendly file names
var name = sanitize(step.name || step.keyword, /[^a-zA-Z0-9-]+/g); // Only allow URL-friendly file names
if (!fs.existsSync(screenshotsDirectory)) {
fs.mkdirSync(screenshotsDirectory);
}

0 comments on commit 5846ab7

Please sign in to comment.
You can’t perform that action at this time.