unescape Fehler gefuxt
This commit is contained in:
parent
f7377723a8
commit
6cd883dd89
@ -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, "„", "„")
|
||||||
|
str = string.gsub(str, "…", "…")
|
||||||
str = string.gsub(str, "‹", "‹")
|
str = string.gsub(str, "‹", "‹")
|
||||||
str = string.gsub(str, "€", "€")
|
str = string.gsub(str, "€", "€")
|
||||||
|
|
||||||
|
@ -13,19 +13,19 @@ local function get_post(post)
|
|||||||
if code ~= 200 then return "HTTP-Fehler" end
|
if code ~= 200 then return "HTTP-Fehler" end
|
||||||
if not data 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 from = data.author.name
|
||||||
local date = makeOurDate(data.date)
|
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
|
if not content then
|
||||||
content = unescape(string.match(data.excerpt, '<p>(.*)</p>'))
|
content = string.match(data.excerpt, '<p>(.*)</p>')
|
||||||
end
|
end
|
||||||
local url = data.url
|
local url = data.url
|
||||||
if data.thumbnail then
|
if data.thumbnail then
|
||||||
image_url = data.thumbnail
|
image_url = data.thumbnail
|
||||||
end
|
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
|
if data.thumbnail then
|
||||||
return text, image_url
|
return text, image_url
|
||||||
|
@ -13,19 +13,19 @@ local function search_post(tag)
|
|||||||
if code ~= 200 then return "HTTP-Fehler" end
|
if code ~= 200 then return "HTTP-Fehler" end
|
||||||
if not data then return "Nichts gefunden!" end
|
if not data then return "Nichts gefunden!" end
|
||||||
|
|
||||||
local title = unescape(data.title)
|
local title = data.title
|
||||||
local from = data.author.name
|
local from = data.author.name
|
||||||
local date = makeOurDate(data.date)
|
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
|
if not content then
|
||||||
content = unescape(string.match(data.excerpt, '<p>(.*)</p>'))
|
content = string.match(data.excerpt, '<p>(.*)</p>')
|
||||||
end
|
end
|
||||||
local url = data.url
|
local url = data.url
|
||||||
if data.thumbnail then
|
if data.thumbnail then
|
||||||
image_url = data.thumbnail
|
image_url = data.thumbnail
|
||||||
end
|
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
|
if data.thumbnail then
|
||||||
return text, image_url
|
return text, image_url
|
||||||
|
@ -13,16 +13,16 @@ local function get_post(post)
|
|||||||
if code ~= 200 then return "HTTP-Fehler" end
|
if code ~= 200 then return "HTTP-Fehler" end
|
||||||
if not data 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 from = data.author.name
|
||||||
local date = makeOurDate(data.date)
|
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
|
local url = data.url
|
||||||
if data.thumbnail then
|
if data.thumbnail then
|
||||||
image_url = data.thumbnail
|
image_url = data.thumbnail
|
||||||
end
|
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
|
if data.thumbnail then
|
||||||
return text, image_url
|
return text, image_url
|
||||||
|
Reference in New Issue
Block a user