From 42af2212d0d7bfb955d8cb1e72eca3a2903fd4c3 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Wed, 17 Jun 2015 22:58:05 +0200 Subject: [PATCH] return url in wiki.lua --- plugins/wiki.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/wiki.lua b/plugins/wiki.lua index e307b24..a5188ee 100644 --- a/plugins/wiki.lua +++ b/plugins/wiki.lua @@ -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