From 3441780708db665e80e55f3356f20c7906f83d83 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Sun, 28 Aug 2016 18:16:35 +0200 Subject: [PATCH] =?UTF-8?q?HTML=20f=C3=BCr=20Reddit=5FPost?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/reddit_post.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/otouto/plugins/reddit_post.lua b/otouto/plugins/reddit_post.lua index fdc0ba1..84441dc 100644 --- a/otouto/plugins/reddit_post.lua +++ b/otouto/plugins/reddit_post.lua @@ -15,9 +15,9 @@ function reddit_post:get_reddit_data(subreddit, reddit_code) end function reddit_post:send_reddit_data(data) - local title = utilities.md_escape(data[1].data.children[1].data.title) - local author = utilities.md_escape(data[1].data.children[1].data.author) - local subreddit = utilities.md_escape(data[1].data.children[1].data.subreddit) + local title = data[1].data.children[1].data.title + local author = data[1].data.children[1].data.author + local subreddit = data[1].data.children[1].data.subreddit if string.len(data[1].data.children[1].data.selftext) > 300 then selftext = string.sub(unescape(data[1].data.children[1].data.selftext:gsub("%b<>", "")), 1, 300) .. '...' else @@ -30,7 +30,7 @@ function reddit_post:send_reddit_data(data) end local score = comma_value(data[1].data.children[1].data.score) local comments = comma_value(data[1].data.children[1].data.num_comments) - local text = '*'..author..'* in */r/'..subreddit..'* _('..score..' Upvotes - '..comments..' Kommentare)_:\n'..title..'\n'..selftext..url + local text = ''..author..' in /r/'..subreddit..' ('..score..' Upvotes - '..comments..' Kommentare):\n'..title..'\n'..selftext..url return text end @@ -44,7 +44,7 @@ function reddit_post:action(msg, config, matches) local text = reddit_post:send_reddit_data(data) if not text then utilities.send_reply(msg, config.errors.connection) return end - utilities.send_reply(msg, text, true) + utilities.send_reply(msg, text, 'HTML') end -return reddit_post +return reddit_post \ No newline at end of file