I was surprised when this method did not replace a `\r` character with an HTML break. I have updated it to not only replace `\n`, but also `\r\n` and just `\r`.
I think these cases should be considered because of [this SO thread](https://stackoverflow.com/questions/4824621/is-a-new-line-n-or-r-n).
The updated code will not replace `\n\r` with one break but with two.
I used [this SO answer](https://stackoverflow.com/a/8196219/2963111) to update the method.
```
[TestMethod]
public void ReplaceLineBreaksForHtmlTest()
{
var result = "foo\rbar\nbaz\r\nbiff\n\r".ReplaceLineBreaksForHtml();
Assert.AreEqual(result, "foo<br />\rbar<br />\nbaz<br />\r\nbiff<br />\n<br />\r");
}
```