libs/http: Added handling of "+" in luci.http.protocl.urldecode
authorSteven Barth <steven@midlink.org>
Sat, 5 Jul 2008 14:23:50 +0000 (14:23 +0000)
committerSteven Barth <steven@midlink.org>
Sat, 5 Jul 2008 14:23:50 +0000 (14:23 +0000)
libs/http/luasrc/http/protocol.lua

index 51cb02d..a187bed 100644 (file)
@@ -30,6 +30,7 @@ function urldecode( str )
        end
 
        if type(str) == "string" then
        end
 
        if type(str) == "string" then
+               str = str:gsub( "+", " " )
                str = str:gsub( "%%([a-fA-F0-9][a-fA-F0-9])", __chrdec )
        end
 
                str = str:gsub( "%%([a-fA-F0-9][a-fA-F0-9])", __chrdec )
        end