diff --git a/activity.go b/activity.go index 6800910..c1419e7 100644 --- a/activity.go +++ b/activity.go @@ -1287,7 +1287,7 @@ func sendchonk(user *WhatAbout, ch *Chonk) { jo["published"] = dt jo["attributedTo"] = user.URL jo["to"] = aud - jo["content"] = ch.Noise + jo["content"] = ch.HTML j := junk.New() j["@context"] = itiswhatitis diff --git a/fun.go b/fun.go index 0c61493..7b88c18 100644 --- a/fun.go +++ b/fun.go @@ -182,7 +182,11 @@ func filterchonk(ch *Chonk) { var htf htfilter.Filter htf.SpanClasses = allowedclasses htf.BaseURL, _ = url.Parse(ch.XID) - ch.HTML, _ = htf.String(ch.Noise) + noise := ch.Noise + if ch.Format == "markdown" { + noise = markitzero(noise) + } + ch.HTML, _ = htf.String(noise) n := string(ch.HTML) if strings.HasPrefix(n, "
") { ch.HTML = template.HTML(n[3:]) diff --git a/web.go b/web.go index 3109d83..14020f4 100644 --- a/web.go +++ b/web.go @@ -1814,6 +1814,7 @@ func submitchonk(w http.ResponseWriter, r *http.Request) { Noise: noise, Format: format, } + filterchonk(&ch) savechonk(&ch) go sendchonk(user, &ch)