Fixes Telegram Reported alerts contain HTML (#7090)

This commit is contained in:
MatteoBiscosi 2023-01-10 12:00:26 +01:00
parent 1e960d5ec5
commit 68722d86d7

View file

@ -151,6 +151,7 @@ function noHtml(s)
local cleaned = s:gsub("<[aA] .->(.-)</[aA]>","%1")
:gsub("<abbr .->(.-)</abbr>","%1")
:gsub("<span .->(.-)</span>","%1")
:gsub("<button .->(.-)</button>","%1")
:gsub("%s*<[iI].->(.-)</[iI]>","%1")
:gsub("<.->(.-)</.->","%1") -- note: keep as last as this does not handle nested tags
:gsub("^%s*(.-)%s*$", "%1")