Module:Utilities: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m url_encode now usable both internally and externally
Sur (talk | contribs)
m url_encode returns '' early
Line 79: Line 79:
if (str == nil) then return "First parameter must be a string" end
if (str == nil) then return "First parameter must be a string" end
if (str == '') then return '' end
-- Just replaces spaces with %20
-- Just replaces spaces with %20
local result = string.gsub(str, " ", "%%20")
local result = string.gsub(str, " ", "%%20")