luci-base: fix bug in util.lua in 'shellsqescape'
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 20 Mar 2016 11:12:05 +0000 (13:12 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 20 Mar 2016 11:12:05 +0000 (13:12 +0200)
commite2e2696430363eb22d5e890c8f0ca28d56434d19
tree569fd1e09dfd72aad388332c91240a3e185034b8
parent355c21304afb0d388fb8bd6132e0dbcb19f03428
luci-base: fix bug in util.lua in 'shellsqescape'

Fix a bug introduced by #561

Function 'shellsqescape' calls 'gsub' with the empty result string 'res'
instead of the actual parameter 'value'. This leads into error:
.../util.lua:160: bad argument #1 to 'gsub' (string expected, got nil)

Fix error by passing the correct parameter to the function.

After the fix, the unmount button introduced by #561 finally works.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
modules/luci-base/luasrc/util.lua