return url in wiki.lua

This commit is contained in:
Akamaru 2015-06-17 22:58:05 +02:00
parent 30dcf34395
commit 42af2212d0

View File

@ -101,10 +101,10 @@ function Wikipedia:wikintro(text, lang)
if page and page.extract then
local lang = lang or "de"
return text..":\n"..page.extract.."\n -- https://"..lang..".wikipedia.org/"..text
local title_enc = URL.escape(page.title)
return text..":\n"..page.extract.."\n -- https://"..lang..".wikipedia.org/wiki/"..title_enc
else
local text = "Extract nicht gefunden für: "..text
text = text..'\n'..table.concat(wikiusage, '\n')
local text = '"'..text..'" nicht gefunden.'
return text
end
else