Module:URL: Difference between revisions

Content deleted Content added
m 1 revision imported from wikipedia:Module:URL
m 1 revision imported from wikipedia:Module:URL
 
(2 intermediate revisions by 2 users not shown)
Line 54:
-- If it's an HTTP[S] URL without the double slash, fix it.
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3')
 
-- Handle URLs from Wikidata of the format http://
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?)://', 'http%1://')
 
local uri = safeUri(url)