aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-06 11:17:46 -0500
committerUnknwon <u@gogs.io>2015-11-06 11:17:46 -0500
commite7aabf70dc05edc19d933c7d5745b898fef9a934 (patch)
treecc6fef2b2cb8659603a8106ca08106c09f47b316 /routers
parent6f929dcd9e950a6aba14fe24cd79765016ece372 (diff)
downloadgitea-e7aabf70dc05edc19d933c7d5745b898fef9a934.tar.gz
gitea-e7aabf70dc05edc19d933c7d5745b898fef9a934.zip
#1905 Triming the issue title
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 763d395bb5..eee300d4c1 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -393,7 +393,7 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
issue := &models.Issue{
RepoID: ctx.Repo.Repository.ID,
Index: repo.NextIssueIndex(),
- Name: form.Title,
+ Name: strings.TrimSpace(form.Title),
PosterID: ctx.User.Id,
Poster: ctx.User,
MilestoneID: milestoneID,
@@ -620,7 +620,7 @@ func UpdateIssueTitle(ctx *middleware.Context) {
return
}
- issue.Name = ctx.Query("title")
+ issue.Name = ctx.QueryTrim("title")
if len(issue.Name) == 0 {
ctx.Error(204)
return