summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/root/usr
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-31 14:50:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-31 14:50:43 +0000
commitc6ea479b06480e6f20bc863515ea5231e86abe63 (patch)
tree972fe4b584effe14d001da9169d23c8ec44d41f7 /applications/luci-statistics/root/usr
parentd82340ada43ccbc098e6f40dfee8603ec1231385 (diff)
* luci/applications: statistics: strip leading and trailing whitespace from config values, fixes OpenWrt Bug #3892
Diffstat (limited to 'applications/luci-statistics/root/usr')
-rwxr-xr-xapplications/luci-statistics/root/usr/bin/stat-genconfig10
1 files changed, 5 insertions, 5 deletions
diff --git a/applications/luci-statistics/root/usr/bin/stat-genconfig b/applications/luci-statistics/root/usr/bin/stat-genconfig
index 071cff2ca5..7f0a05f5fe 100755
--- a/applications/luci-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-statistics/root/usr/bin/stat-genconfig
@@ -224,19 +224,19 @@ function _string( s, n, nopad )
if s then
if s:find("[^%d]") then
if not s:find("[^%w]") then
- str = pad .. n .. " " .. s
+ str = pad .. n .. " " .. luci.util.trim(s)
else
- str = pad .. n .. ' "' .. s .. '"'
+ str = pad .. n .. ' "' .. luci.util.trim(s) .. '"'
end
else
- str = pad .. n .. " " .. s
+ str = pad .. n .. " " .. luci.util.trim(s)
end
str = str .. "\n"
end
return str
-end
+end
plugins = {
@@ -252,7 +252,7 @@ plugins = {
{ }
},
- csv = {
+ csv = {
{ "DataDir" },
{ "StoreRates" },
{ }