summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-29 00:24:24 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-29 00:24:24 (EST)
commitec4f1c6409742f9f4bea0efef2c994c51e88c0c7 (patch)
tree6257b3032ad7b80ac75fc1ed4360c38b4e1979c0
parent8ef2224a35530f1edf064bbc49b3a45824f2fe25 (diff)
ob_set_substvar(): Improve eval command
-rw-r--r--lib/control.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 15faf45..53a3ea8 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -237,10 +237,7 @@ ob_set_substvar()
};
')"
- # Escape single quotes in value.
- value="$(printf '%s\n' "${value}" | sed "s/'/'\\\\''/g")"
-
- eval "_OB_SUBSTVAR_${name}='${value}'"
+ eval "_OB_SUBSTVAR_${name}=\"\${value}\""
return 0
}