libs/cbi: allow underscores in AbstractSection.create()

This commit is contained in:
Jo-Philipp Wich 2009-10-09 00:45:47 +00:00
parent 9ebb038a94
commit 5c4a002a46

View file

@ -931,7 +931,7 @@ function AbstractSection.create(self, section)
local stat
if section then
stat = section:match("^%w+$") and self.map:set(section, nil, self.sectiontype)
stat = section:match("^[%w_]+$") and self.map:set(section, nil, self.sectiontype)
else
section = self.map:add(self.sectiontype)
stat = section