Module:Ordnance Survey coordinates/sandbox: Difference between revisions

Content deleted Content added
check for empty string directly
protect against empty strings
Line 354:
end
linktitle = trim(linktitle)
if not empty(LL[2] ~= nil) then
return linktitle ..warning(LL[2])
end
Line 363:
end
url = url..'https://geohack.toolforge.org/geohack.php?'
if not empty(pagename ~= nil) then
url = url..'pagename='..pagename..'&'
end
Line 378:
url = url..'_region:'..LL[1]
end
if not empty(namearg) then
url = url .. "&title=" .. mw.uri.encode(namearg)
end