diff --git a/editor.go b/editor.go index 8c3226a..b121cae 100644 --- a/editor.go +++ b/editor.go @@ -29,12 +29,7 @@ func (a *goBlog) serveEditorPost(w http.ResponseWriter, r *http.Request) { if action := r.FormValue("editoraction"); action != "" { switch action { case "loadupdate": - parsedURL, err := url.Parse(r.FormValue("url")) - if err != nil { - a.serveError(w, r, err.Error(), http.StatusBadRequest) - return - } - post, err := a.getPost(parsedURL.Path) + post, err := a.getPost(r.FormValue("path")) if err != nil { a.serveError(w, r, err.Error(), http.StatusBadRequest) return @@ -42,7 +37,7 @@ func (a *goBlog) serveEditorPost(w http.ResponseWriter, r *http.Request) { a.render(w, r, templateEditor, &renderData{ BlogString: blog, Data: map[string]interface{}{ - "UpdatePostURL": parsedURL.String(), + "UpdatePostURL": a.fullPostURL(post), "UpdatePostContent": a.postToMfItem(post).Properties.Content[0], }, }) diff --git a/templates/post.gohtml b/templates/post.gohtml index 520f779..f7950d5 100644 --- a/templates/post.gohtml +++ b/templates/post.gohtml @@ -25,7 +25,7 @@
- +
diff --git a/templates/statichome.gohtml b/templates/statichome.gohtml index 83afbee..7a93cc0 100644 --- a/templates/statichome.gohtml +++ b/templates/statichome.gohtml @@ -19,7 +19,7 @@
- +