all repos — honk @ 9bc0903f98725d5301134ce488119fb44a1aee2e

my fork of honk

save links to the external attachments we don't want to save
Ted Unangst tedu@tedunangst.com
Sun, 28 Apr 2019 22:28:59 -0400
commit

9bc0903f98725d5301134ce488119fb44a1aee2e

parent

92f3c8413c1b120c705532c774bf72419556a5cd

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M activity.goactivity.go

@@ -22,6 +22,7 @@ "crypto/rsa"

"database/sql" "encoding/json" "fmt" + "html" "image" "io" "log"

@@ -538,7 +539,13 @@ donk := savedonk(u, name, mt)

if donk != nil { xonk.Donks = append(xonk.Donks, donk) } + } else { + u = html.EscapeString(u) + content += fmt.Sprintf( + `<p>External attachment: <a href="%s" rel=noreferrer>%s</a>`, u, u) } + } else { + log.Printf("unknown attachment: %s", at) } } tags, _ := jsongetarray(obj, "tag")