Module:Utilities: Difference between revisions

Sur (talk | contribs)
m url_encode fixed parameter not expecting frame
Sur (talk | contribs)
m url_encode fix, returning both values from gsub instead of just resulting string
Line 76: Line 76:
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
return string.gsub(str, " ", "%%20")
local result = string.gsub(str, " ", "%%20")
return result --must assign as local result first to grab just first returned result
end
end
return p
return p