Module:Utilities: Difference between revisionsGive feedback
m url_encode fix, returning both values from gsub instead of just resulting string |
m url_encode now usable both internally and externally |
||
| Line 72: | Line 72: | ||
--Much room for expansion here | --Much room for expansion here | ||
p.url_encode = function( | p.url_encode = function(str) | ||
if type(str) == 'table' and str.args then | |||
frame = str | |||
str = frame.args[1] | |||
end | |||
if (str == nil) then return "First parameter must be a string" end | if (str == nil) then return "First parameter must be a string" end | ||
-- Just replaces spaces with %20 | -- Just replaces spaces with %20 | ||