~ols/mudliag

147b5119483557f80349c1349659495b02633c5b — Charlie Root 3 years ago 7a1fff2 + 63b09db
Merge branch 'master' of git.sr.ht:~ols/mudliag
1 files changed, 7 insertions(+), 0 deletions(-)

M main.go
M main.go => main.go +7 -0
@@ 320,8 320,15 @@ var actuallySubmit = http.HandlerFunc(func(w http.ResponseWriter, r *http.Reques
		authorBool = false
	}
	tags := html.EscapeString(reg.ReplaceAllString(r.FormValue("tags"), ""))
	if len(title) < 1 || len(submitter) < 1 || len(tags) < 1 {
		w.Write([]byte("You missed a field"))
		return
	}
	slug := StringWithCharset(6, charset)
	currentTime := time.Now()
	if len(url) < 1 {
		url = "/s/" + slug
	}

	submissionTags := strings.Split(tags, ",")