模块:UrlDecode:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“local function urlDecode(s) s = string.gsub(s, '%%(%x%x)', function(h) return string.char(tonumber(h, 16)) end) return s end”
 
Kangkk​(留言 | 贡献)
无编辑摘要
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
local p = {}
local function urlDecode(s)     
local function urlDecode(s)     
     s = string.gsub(s, '%%(%x%x)', function(h)  
     s = string.gsub(s, '%%(%x%x)', function(h)  
第4行: 第5行:
     return s
     return s
end
end
function p.url(frame)
local str = frame.args.str
    return urlDecode(str)
end
return p