1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-03 15:46:23 -07:00

Fix chopping off n at the end of posts.

Cause was some escaped backslashes that shouldn't have been escaped.
This commit is contained in:
Darren VanBuren 2017-08-05 01:23:22 -07:00
parent bf446f25f4
commit b7e9815ebd

View file

@ -686,7 +686,7 @@ func makePost(w http.ResponseWriter, r *http.Request, data interface{}) {
post.Email = "" post.Email = ""
} }
post.Subject = html.EscapeString(escapeString(request.FormValue("postsubject"))) post.Subject = html.EscapeString(escapeString(request.FormValue("postsubject")))
post.MessageText = strings.Trim(escapeString(request.FormValue("postmsg")),"\\r\\n") post.MessageText = strings.Trim(escapeString(request.FormValue("postmsg")),"\r\n")
err := db.QueryRow("SELECT `max_message_length` FROM `" + config.DBprefix + "boards` WHERE `id` = " + strconv.Itoa(post.BoardID)).Scan(&max_message_length) err := db.QueryRow("SELECT `max_message_length` FROM `" + config.DBprefix + "boards` WHERE `id` = " + strconv.Itoa(post.BoardID)).Scan(&max_message_length)
if err != nil { if err != nil {