html escape summary fields
Ted Unangst tedu@tedunangst.com
Sun, 06 Oct 2019 15:23:42 -0400
2 files changed,
3 insertions(+),
3 deletions(-)
M
activity.go
→
activity.go
@@ -20,6 +20,7 @@ "bytes"
"crypto/rsa" "database/sql" "fmt" + "html" "io" "log" notrand "math/rand"@@ -992,7 +993,7 @@ jo["directMessage"] = true
} translate(h) h.Noise = re_memes.ReplaceAllString(h.Noise, "") - jo["summary"] = h.Precis + jo["summary"] = html.EscapeString(h.Precis) jo["content"] = ontologize(mentionize(h.Noise)) if strings.HasPrefix(h.Precis, "DZ:") { jo["sensitive"] = true@@ -1070,7 +1071,7 @@ }
jd := junk.New() jd["mediaType"] = d.Media jd["name"] = d.Name - jd["summary"] = d.Desc + jd["summary"] = html.EscapeString(d.Desc) jd["type"] = "Document" jd["url"] = d.URL atts = append(atts, jd)
M
markitzero.go
→
markitzero.go
@@ -23,7 +23,6 @@
"golang.org/x/net/html" ) - var re_bolder = regexp.MustCompile(`(^|\W)\*\*([\w\s,.!?':_-]+)\*\*($|\W)`) var re_italicer = regexp.MustCompile(`(^|\W)\*([\w\s,.!?':_-]+)\*($|\W)`) var re_bigcoder = regexp.MustCompile("```\n?((?s:.*?))\n?```\n?")