Module:Hatnote: Difference between revisions
Jump to navigation
Jump to search
detect piped link hacks made with the {{!}} parser function
>Mr. Stradivarius (Undid revision 609825678 by SMcCandlish (talk) this change will have quite far-reaching consequences, so should be discussed first) |
>Mr. Stradivarius (detect piped link hacks made with the {{!}} parser function) |
||
Line 147: | Line 147: | ||
else | else | ||
colon = '' | colon = '' | ||
end | |||
-- Find whether a faux display value has been added with the {{!}} magic | |||
-- word. | |||
if not display then | |||
local prePipe, postPipe = link:match('^(.-)|(.*)$') | |||
link = prePipe or link | |||
display = postPipe | |||
end | end | ||