Insert suggestion parses \n and replaces it with an actual newline
Summary
Inserting a suggestion for a line that contains \n
replaces the \n
with an actual newline.
Steps to reproduce
Create a comment on line 3 in slovdahl/insert-suggestion-reproducer!1 (diffs), and press the "Insert suggestion" button.
This is what it should look like:
Example Project
slovdahl/insert-suggestion-reproducer!1 (diffs)
What is the current bug behavior?
The \n
character is seemingly parsed and replaced with an actual newline in the text field.
What is the expected correct behavior?
The \n
is retained as is in the text field.
Relevant logs and/or screenshots
Output of checks
Happens both on GitLab.com and on a privately hosted 13.12.3-ee.
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)