Module:URLEncode

From The Joe Frank Wiki
Revision as of 08:08, 27 October 2024 by Ramon (talk | contribs) (a)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:URLEncode/doc

local p = {}

function p.encode(frame)
    -- Retrieve the current page title directly
    local title = mw.title.getCurrentTitle().text
    -- Perform URL encoding
    return mw.uri.encode(title, 'PATH')
end

return p