unescape Fehler gefuxt

This commit is contained in:
Akamaru 2016-03-04 16:34:52 +01:00
parent f7377723a8
commit 6cd883dd89
4 changed files with 12 additions and 11 deletions

View File

@ -557,6 +557,7 @@ function unescape(str)
str = string.gsub(str, "“", "")
str = string.gsub(str, "”", "")
str = string.gsub(str, "„", "")
str = string.gsub(str, "…", "")
str = string.gsub(str, "‹", "")
str = string.gsub(str, "€", "")

View File

@ -13,19 +13,19 @@ local function get_post(post)
if code ~= 200 then return "HTTP-Fehler" end
if not data then return "HTTP-Fehler" end
local title = unescape(data.title)
local title = data.title
local from = data.author.name
local date = makeOurDate(data.date)
local content = unescape(string.match(data.excerpt, '<p>(.*)<span'))
local content = string.match(data.excerpt, '<p>(.*)<span')
if not content then
content = unescape(string.match(data.excerpt, '<p>(.*)</p>'))
content = string.match(data.excerpt, '<p>(.*)</p>')
end
local url = data.url
if data.thumbnail then
image_url = data.thumbnail
end
local text = title..' ('..from..' am '..date..')\n\n'..content..'...\n'..url
local text = unescape(title..' ('..from..' am '..date..')\n\n'..content)..'...\n'..url
if data.thumbnail then
return text, image_url

View File

@ -13,19 +13,19 @@ local function search_post(tag)
if code ~= 200 then return "HTTP-Fehler" end
if not data then return "Nichts gefunden!" end
local title = unescape(data.title)
local title = data.title
local from = data.author.name
local date = makeOurDate(data.date)
local content = unescape(string.match(data.excerpt, '<p>(.*)<span'))
local content = string.match(data.excerpt, '<p>(.*)<span')
if not content then
content = unescape(string.match(data.excerpt, '<p>(.*)</p>'))
content = string.match(data.excerpt, '<p>(.*)</p>')
end
local url = data.url
if data.thumbnail then
image_url = data.thumbnail
end
local text = title..' ('..from..' am '..date..')\n\n'..content..'...\n'..url
local text = unescape(title..' ('..from..' am '..date..')\n\n'..content)..'...\n'..url
if data.thumbnail then
return text, image_url

View File

@ -13,16 +13,16 @@ local function get_post(post)
if code ~= 200 then return "HTTP-Fehler" end
if not data then return "HTTP-Fehler" end
local title = unescape(data.title)
local title = data.title
local from = data.author.name
local date = makeOurDate(data.date)
local content = unescape(string.match(data.excerpt, '<p>(.*)</p>'))
local content = string.match(data.excerpt, '<p>(.*)</p>')
local url = data.url
if data.thumbnail then
image_url = data.thumbnail
end
local text = title..' ('..from..' am '..date..')\n\n'..content..'...\n'..url
local text = unescape(title..' ('..from..' am '..date..')\n\n'..content)..'...\n'..url
if data.thumbnail then
return text, image_url