Module:URLEncode
From The Joe Frank Wiki
Documentation for this module may be created at Module:URLEncode/doc
local p = {}
function p.encode(frame)
local str = frame.args[1] or ''
-- Decode any HTML entities back to their original characters
str = mw.text.decode(str)
-- Perform URL encoding
return mw.uri.encode(str, 'PATH')
end
return p