Add an option to mdToHTML to strip links

This commit is contained in:
Daniele Tonon
2023-11-28 20:15:38 +01:00
parent 8a99017259
commit e4cd448c4c
3 changed files with 18 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ func renderEmbedded(w http.ResponseWriter, r *http.Request, code string) {
}
if data.event.Kind == 30023 || data.event.Kind == 30024 {
data.content = mdToHTML(data.content, data.templateId == TelegramInstantView)
data.content = mdToHTML(data.content, data.templateId == TelegramInstantView, true)
} else {
// first we run basicFormatting, which turns URLs into their appropriate HTML tags
data.content = basicFormatting(html.EscapeString(data.content), true, false, false)