From ca617f3a0b1c5b0516128e143c0352a204ccadea Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 16 Nov 2012 21:35:17 -0500 Subject: ob_set_substvar(): Escape single quotes in value. --- (limited to 'lib') diff --git a/lib/control.sh b/lib/control.sh index 746863e..d480c22 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -177,6 +177,9 @@ ob_set_substvar() }; ')" + # Escape single quotes in value. + _obssv_value="$(printf '%s\n' "${_obssv_value}" | sed "s/'/'\\\\''/g")" + eval "_OB_SUBSTVAR_${_obssv_name}='${_obssv_value}'" _ob_return 125 -- cgit v0.9.1