Module:Redirect/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
sync
Jackmcbarn (talk | contribs)
add htmldecode - for cases when {{#invoke:redirect|main|{{TALKPAGENAME}}}} is used and an apostrophe (or something) is in the talk page name
Line 36:
if type(rname) ~= "string" or not mw.ustring.match(rname, "%S") then return end
bracket = bracket and "[[%s]]" or "%s"
if args.htmldecode then rname = mw.text.decode(rname) end
rname = mw.ustring.match(rname, "%[%[(.+)%]%]") or rname