Jump to content

Module:Citation/CS1: Difference between revisions

m
change link_param_ok (value) to allow underscore;
m>Trappist the monk
(Synch from sandbox;)
m>Trappist the monk
m (change link_param_ok (value) to allow underscore;)
Line 266: Line 266:
Link parameters are to hold the title of a wikipedia article so none of the WP:TITLESPECIALCHARACTERS are allowed:
Link parameters are to hold the title of a wikipedia article so none of the WP:TITLESPECIALCHARACTERS are allowed:
# < > [ ] | { } _
# < > [ ] | { } _
except the underscore which is used as a space in wiki urls
returns false when the value contains any of these characters.
returns false when the value contains any of these characters.


Line 275: Line 277:
local function link_param_ok (value)
local function link_param_ok (value)
local scheme, domain;
local scheme, domain;
if value:find ('[#<>%[%]|{}_]') then -- if any prohibited characters
if value:find ('[#<>%[%]|{}]') then -- if any prohibited characters
return false;
return false;
end
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.