not neeed urldecode also dropping titles/notes
This commit is contained in:
parent
2a13a49474
commit
e75c81fa36
|
@ -15,7 +15,6 @@ import (
|
|||
"github.com/dballard/transmet/news"
|
||||
"bytes"
|
||||
txtTemplate "text/template"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func GetFlashes(session *sessions.Session) map[string]interface{} {
|
||||
|
@ -151,7 +150,6 @@ func addFormHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
|
|||
session.Save(r, w)
|
||||
|
||||
if link != nil {
|
||||
fmt.Println("link: '" + link.(string) + "'")
|
||||
//TODO category_id
|
||||
ShowTemplate("add", w, map[string]interface{}{"user": user, "flashes": flashes, "categories": categories.CategoriesTree, "link": link, "title": title, "description": description, "popup": popup})
|
||||
return
|
||||
|
@ -177,8 +175,8 @@ func addPostHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
|
|||
session, _ := store.Get(r, "c_user")
|
||||
var news news.News
|
||||
|
||||
news.Title, _ = url.QueryUnescape(r.FormValue("title"))
|
||||
news.Notes, _ = url.QueryUnescape(r.FormValue("notes"))
|
||||
news.Title = r.FormValue("title")
|
||||
news.Notes = r.FormValue("notes")
|
||||
news.Url = r.FormValue("link")
|
||||
popup := r.FormValue("popup")
|
||||
category_id, err := strconv.Atoi(r.FormValue("category"))
|
||||
|
|
Loading…
Reference in New Issue