@@ -140,7 +140,7 @@ func SearchIssues(ctx *context.APIContext) {
140
140
var issues []* models.Issue
141
141
var filteredCount int64
142
142
143
- keyword := strings . Trim ( ctx .FormString ("q" ), " " )
143
+ keyword := ctx .FormTrim ("q" )
144
144
if strings .IndexByte (keyword , 0 ) >= 0 {
145
145
keyword = ""
146
146
}
@@ -162,13 +162,13 @@ func SearchIssues(ctx *context.APIContext) {
162
162
isPull = util .OptionalBoolNone
163
163
}
164
164
165
- labels := strings . TrimSpace ( ctx .FormString ("labels" ) )
165
+ labels := ctx .FormTrim ("labels" )
166
166
var includedLabelNames []string
167
167
if len (labels ) > 0 {
168
168
includedLabelNames = strings .Split (labels , "," )
169
169
}
170
170
171
- milestones := strings . TrimSpace ( ctx .FormString ("milestones" ) )
171
+ milestones := ctx .FormTrim ("milestones" )
172
172
var includedMilestones []string
173
173
if len (milestones ) > 0 {
174
174
includedMilestones = strings .Split (milestones , "," )
@@ -331,7 +331,7 @@ func ListIssues(ctx *context.APIContext) {
331
331
var issues []* models.Issue
332
332
var filteredCount int64
333
333
334
- keyword := strings . Trim ( ctx .FormString ("q" ), " " )
334
+ keyword := ctx .FormTrim ("q" )
335
335
if strings .IndexByte (keyword , 0 ) >= 0 {
336
336
keyword = ""
337
337
}
0 commit comments