From 0ab8871a38f99225b305d737da848605663ab6e3 Mon Sep 17 00:00:00 2001 From: dxdc Date: Fri, 18 Aug 2017 20:45:52 -0500 Subject: [PATCH] Allow custom CasperJS run paths with spaces --- src/Casper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Casper.php b/src/Casper.php index e5fec51..832a16a 100644 --- a/src/Casper.php +++ b/src/Casper.php @@ -39,7 +39,7 @@ class Casper public function __construct($path2casper = null, $tempDir = null) { if ($path2casper) { - $this->path2casper = $path2casper; + $this->setPath2Casper($path2casper); } if ($tempDir) { $this->tempDir = $tempDir; @@ -52,7 +52,7 @@ public function __construct($path2casper = null, $tempDir = null) */ public function setPath2Casper($path) { - $this->path2casper = $path; + $this->path2casper = escapeshellarg($path); return $this; }