Skip to content

Commit

Permalink
Merge pull request #41 from jgornick/escape-all-arguments
Browse files Browse the repository at this point in the history
Update getCommand to escape all arguments.
  • Loading branch information
mikehaertl committed Apr 15, 2014
2 parents bb77e17 + 95f78e1 commit aa59bcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WkHtmlToPdf.php
Expand Up @@ -182,7 +182,7 @@ public function setPageOptions($options=array())

/**
* @param array $options list of options as name/value pairs
*
*
* @return array options processed
*/
public function processOptions($options=array())
Expand Down Expand Up @@ -264,13 +264,13 @@ public function getTmpDir()
*/
public function getCommand($filename)
{
$command = $this->enableEscaping ? escapeshellarg($this->getBin()) : $this->getBin();
$command = $this->escape($this->getBin());

$command .= $this->renderOptions($this->options);

foreach($this->objects as $object)
{
$command .= ' '.$object['input'];
$command .= ' '.$this->escape($object['input']);
unset($object['input']);
$command .= $this->renderOptions($object);
}
Expand Down

0 comments on commit aa59bcb

Please sign in to comment.