summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-30 02:39:03 +0700
committerDaniil Baturin <daniil@baturin.org>2018-05-30 02:39:03 +0700
commitd1927854401c2109f80fe858cfd69f3925e8c9a3 (patch)
treed1b4f4628bbfad7e9eb79dbb2f0d083a11021861
parentb97cd2afc83ce874402ac8bbce4414fd54d7a34e (diff)
downloadlibvyosconfig-d1927854401c2109f80fe858cfd69f3925e8c9a3.tar.gz
libvyosconfig-d1927854401c2109f80fe858cfd69f3925e8c9a3.zip
Quote all values just to be safe.
-rw-r--r--lib/vyos1x_renderer.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vyos1x_renderer.ml b/lib/vyos1x_renderer.ml
index f655f32..df2d7be 100644
--- a/lib/vyos1x_renderer.ml
+++ b/lib/vyos1x_renderer.ml
@@ -30,9 +30,9 @@ let make_indent indent level = String.make (level * indent) ' '
let render_values indent_str name values =
match values with
| [] -> Printf.sprintf "%s%s { }\n" indent_str name
- | [v] -> Printf.sprintf "%s%s %s\n" indent_str name v
+ | [v] -> Printf.sprintf "%s%s \"%s\"\n" indent_str name v
| _ ->
- let rendered = List.map (fun s -> Printf.sprintf "%s%s %s" indent_str name s) values in
+ let rendered = List.map (fun s -> Printf.sprintf "%s%s \"%s\"" indent_str name s) values in
let rendered = String.concat "\n" rendered in
Printf.sprintf "%s\n" rendered