Skip to content

Commit

Permalink
escapes strings
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmascarell committed Nov 24, 2014
1 parent e9b03d3 commit e8a6851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mascame/Arrayer/Arrayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function start()
*/
protected function keyStart($key)
{
return $this->getIndentationTabs() . '"' . $key . '" => array(' . PHP_EOL;
return $this->getIndentationTabs() . $this->wrapElement($key) . ' => array(' . PHP_EOL;
}

/**
Expand Down Expand Up @@ -122,7 +122,7 @@ protected function getIndentationTabs($plus = 0) {
* @return string
*/
private function wrapElement($string) {
return '"' . $string . '"';
return '"' . addslashes($string) . '"';
}

/**
Expand Down

0 comments on commit e8a6851

Please sign in to comment.