normalize image urls
Ted Unangst tedu@tedunangst.com
Sun, 10 Nov 2019 23:49:09 -0500
M
fun.go
→
fun.go
@@ -24,6 +24,7 @@ "html/template"
"io" "log" "net/http" + "net/url" "os" "regexp" "strings"@@ -95,6 +96,7 @@ {
var htf htfilter.Filter htf.Imager = replaceimgsand(zap, false) htf.SpanClasses = allowedclasses + htf.BaseURL, _ = url.Parse(h.XID) p, _ := htf.String(h.Precis) n, _ := htf.String(h.Noise) h.Precis = string(p)@@ -183,6 +185,7 @@
func imaginate(honk *Honk) { var htf htfilter.Filter htf.Imager = inlineimgsfor(honk) + htf.BaseURL, _ = url.Parse(honk.XID) htf.String(honk.Noise) }
M
go.mod
→
go.mod
@@ -7,7 +7,7 @@ github.com/mattn/go-runewidth v0.0.4
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 golang.org/x/net v0.0.0-20190620200207-3b0461eec859 humungus.tedunangst.com/r/go-sqlite3 v1.1.3 - humungus.tedunangst.com/r/webs v0.6.24 + humungus.tedunangst.com/r/webs v0.6.25 ) go 1.11
M
go.sum
→
go.sum
@@ -22,5 +22,5 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI= humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= -humungus.tedunangst.com/r/webs v0.6.24 h1:/Svffk8mEWXsb7RiKJ94g/FKi941C5pbRX6UKFc4bXs= -humungus.tedunangst.com/r/webs v0.6.24/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= +humungus.tedunangst.com/r/webs v0.6.25 h1:Vq9P9q83al9RX/tKF5eZbZCu8BRseKgDe0AXXM7gltY= +humungus.tedunangst.com/r/webs v0.6.25/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=