diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua index a5dd640dd..bddc19a63 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua @@ -144,7 +144,7 @@ ip_list.wrap = "off" ip_list.validate = function(self, value) local ipmasks= {} value = value:gsub("^%s+", ""):gsub("%s+$","\n"):gsub("\r\n","\n"):gsub("[ \t]*\n[ \t]*", "\n") - string.gsub(value, '[^' .. "\r\n" .. ']+', function(w) table.insert(ipmasks, w) end) + string.gsub(value, "[^\r\n]+", function(w) table.insert(ipmasks, w) end) for index, ipmask in ipairs(ipmasks) do if ipmask:find("geoip:") and ipmask:find("geoip:") == 1 and not ipmask:find("%s") then elseif ipmask:find("ext:") and ipmask:find("ext:") == 1 and not ipmask:find("%s") then