Jump to content

Module:Citation/CS1: Difference between revisions

Changed doi validation test to accept all terminal punctuation except period and comma;
m>Trappist the monk
(Synch from sandbox;)
m>Trappist the monk
(Changed doi validation test to accept all terminal punctuation except period and comma;)
Line 338: Line 338:
end
end


if nil == id:match("^10%.[^%s–]-[^%p]$") then -- doi must begin with '10.', must not contain spaces or endashes, and must not end with punctuation
if nil == id:match("^10%.[^%s–]-[^%.,]$") then -- doi must begin with '10.', must not contain spaces or endashes, and must not end with period or comma
cat = seterror( 'bad_doi' );
cat = seterror( 'bad_doi' );
end
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.