Anonymous user
Module:Delink: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
simplify bad title check
(decode HTML entities in URLs) |
(simplify bad title check) |
||
Line 37:
return delinkReversePipeTrick(s)
end
s = mw.uri.decode(s, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs.
s = mw.text.decode(s, true) -- decode HTML entities.
-- Check for bad titles. To do this we need to find the
Line 46 ⟶ 49:
titlearea = mw.ustring.match(s, "^%[%[(.-)%]%]")
end
-- Check for bad characters.
return s
▲ end
▲ if mw.ustring.match(titlearea, v) then
end
|