libs/cbi: allow underscores in AbstractSection.create()
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Oct 2009 00:45:47 +0000 (00:45 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Oct 2009 00:45:47 +0000 (00:45 +0000)
libs/cbi/luasrc/cbi.lua

index 23a5f01..1b22db0 100644 (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