Updating MR title through Web UI results in unnecessary MR description carriage return changes

Summary

Updating the MR title through the web results in the MR description line returns getting changed from \n to \r\n.

Steps to reproduce

Create an MR through the API that uses \n line returns instead of \r\n. Then, rename the MR through the web UI. If you look at a webhook, it will include description changes like this:

        "changes": {
            "description": {
                "previous": "This MR contains the following updates:\n\n| Package ... ",
                "current": "This MR contains the following updates:\r\n\r\n| Package ... "
            },

Example Project

Not necessary I think

What is the current bug behavior?

MR descriptions with \n line returns get massaged to use \r\n carriage returns the first time you edit the MR and save it, for any reason.

What is the expected correct behavior?

There is no need to massage the description unnecessarily, particular as it results in a webhook informing other systems that the description has changed, when it essentially hasn't. If GitLab decides to enforce Windows carriage returns then perhaps it should be done at the time the MR is created via the API. Otherwise, preserve them as-is.

Relevant logs and/or screenshots

See above

Output of checks

This bug happens on GitLab.com

Assignee Loading
Time tracking Loading