luci-0.9: merge r5382
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Oct 2009 00:46:32 +0000 (00:46 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Oct 2009 00:46:32 +0000 (00:46 +0000)
libs/cbi/luasrc/cbi.lua

index d391acf7cc031d52bb2249f047e6eb03fbdd8acf..c75f4f88fb5be65b20502990eecc73f8441d7339 100644 (file)
@@ -893,7 +893,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