luci-base: introduce luci.util.shellquote()
[project/luci.git] / modules / luci-base / luasrc / util.luadoc
index 949aeb2..79a17a2 100644 (file)
@@ -83,6 +83,15 @@ Strip HTML tags from given string.
 ]]
 
 ---[[
+Safely quote value for use in shell commands.
+
+@class function
+@name shellquote
+@param value  String containing the value to quote
+@return Single-quote enclosed string with embedded quotes escaped
+]]
+
+---[[
 Splits given string on a defined separator sequence and return a table
 
 containing the resulting substrings. The optional max parameter specifies