Module:Citation/CS1/Identifiers: Difference between revisions

doi.org is not accepting fully url encoded urls; '/' character must not be encoded;
imported>Rob Kam
m (1 revision imported)
(doi.org is not accepting fully url encoded urls; '/' character must not be encoded;)
Line 27: Line 27:
if options.encode == true or options.encode == nil then
if options.encode == true or options.encode == nil then
url_string = mw.uri.encode( url_string );
url_string = mw.uri.encode( url_string );
if 'doi' == options.label then -- 2018-07-02 doi.org stopped accepting urls with url encoded '/' (%2F)
url_string = url_string:gsub ('%%2F', '/'); -- special case for doi; undo url-encoded slashes
end
end
end