* luci/applications: statistics: strip leading and trailing whitespace from config values, fixes OpenWrt Bug #3892
This commit is contained in:
parent
d82340ada4
commit
c6ea479b06
1 changed files with 5 additions and 5 deletions
|
@ -224,12 +224,12 @@ 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"
|
||||
|
|
Loading…
Reference in a new issue