summaryrefslogtreecommitdiff
path: root/src/edit/posthack.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit/posthack.go')
-rw-r--r--src/edit/posthack.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/edit/posthack.go b/src/edit/posthack.go
index 9e4759e..fad692b 100644
--- a/src/edit/posthack.go
+++ b/src/edit/posthack.go
@@ -44,6 +44,9 @@ func PostHack(req *http.Request) {
req.MultipartForm = nil
} else if bodies := req.PostForm["_body"]; len(bodies) > 0 {
body := bodies[0]
+ if req.PostFormValue("_body_decrlf") != "" {
+ body = strings.Replace(body, "\r\n", "\n", -1)
+ }
req.Body = ioutil.NopCloser(strings.NewReader(body))
if req.Header.Get("Content-Length") != "" {
req.Header.Set("Content-Length", strconv.Itoa(len(body)))