Skip to content

Commit

Permalink
Fixed #214
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 2, 2022
1 parent 20f1119 commit 8fbdf16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Contact Form

## Unreleased

### Fixed
- Fixed a bug where newlines were getting replaced with double newlines in message bodies. ([#214](https://github.com/craftcms/contact-form/issues/214))

## 2.5.0 - 2022-04-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function compileTextBody(Submission $submission): string
}

if ($body !== '') {
$body = preg_replace('/\R/u', "\n\n", $body);
$body = preg_replace('/\R/u', "\n", $body);
$text .= "\n\n" . $body;
}

Expand Down

0 comments on commit 8fbdf16

Please sign in to comment.