Commit 752d5280 authored by Drew Blessing's avatar Drew Blessing

Fix trailing space issue with merge requests and issues. Fixes #2514

parent ca25289b
...@@ -30,6 +30,7 @@ v 8.2.0 (unreleased) ...@@ -30,6 +30,7 @@ v 8.2.0 (unreleased)
- Fix incoming email config defaults - Fix incoming email config defaults
- MR target branch is now visible on a list view when it is different from project's default one - MR target branch is now visible on a list view when it is different from project's default one
- Improve Continuous Integration graphs page - Improve Continuous Integration graphs page
- Fix trailing whitespace issue in merge request/issue title
v 8.1.4 v 8.1.4
- Fix bug where manually merged branches in a MR would end up with an empty diff (Stan Hu) - Fix bug where manually merged branches in a MR would end up with an empty diff (Stan Hu)
......
...@@ -158,10 +158,12 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -158,10 +158,12 @@ class Projects::IssuesController < Projects::ApplicationController
end end
def issue_params def issue_params
params.require(:issue).permit( permitted = params.require(:issue).permit(
:title, :assignee_id, :position, :description, :title, :assignee_id, :position, :description,
:milestone_id, :state_event, :task_num, label_ids: [] :milestone_id, :state_event, :task_num, label_ids: []
) )
params[:issue][:title].strip! if params[:issue][:title]
permitted
end end
def bulk_update_params def bulk_update_params
......
...@@ -276,11 +276,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -276,11 +276,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end end
def merge_request_params def merge_request_params
params.require(:merge_request).permit( permitted = params.require(:merge_request).permit(
:title, :assignee_id, :source_project_id, :source_branch, :title, :assignee_id, :source_project_id, :source_branch,
:target_project_id, :target_branch, :milestone_id, :target_project_id, :target_branch, :milestone_id,
:state_event, :description, :task_num, label_ids: [] :state_event, :description, :task_num, label_ids: []
) )
params[:merge_request][:title].strip! if params[:merge_request][:title]
permitted
end end
# Make sure merge requests created before 8.0 # Make sure merge requests created before 8.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment