Skip to content

Commit

Permalink
[jan] Correctly escape/quote special characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 24, 2017
1 parent 0da0d5c commit f5ec5cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Horde/Yaml/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected function _dumpNode($key, $value, $indent, $sequence = false)
// Quote strings if necessary, and not folded
if (!$literal &&
strpos($value, "\n") === false &&
strchr($value, '#')) {
(strchr($value, '#') || $value[0] == '*' || $value[0] == '&')) {
$value = "'{$value}'";
}

Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* [jan] Correctly escape/quote special characters.
* [jan] Implement block chomping.
* [jan] Don&apos;t add trailing whitespace after keys.
</notes>
Expand Down Expand Up @@ -318,6 +319,7 @@
<date>2017-10-20</date>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* [jan] Correctly escape/quote special characters.
* [jan] Implement block chomping.
* [jan] Don&apos;t add trailing whitespace after keys.
</notes>
Expand Down

0 comments on commit f5ec5cb

Please sign in to comment.