grafana ticketing 81244 : Emails fails if the alert title has a newline char (#1499)

# What this PR does
Emails fails if the alert title has a newline char
## Which issue(s) this PR fixes
Grafana tickets : 81244
## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
This commit is contained in:
Manu Vamadevan 2023-03-08 18:08:19 +01:00 committed by GitHub
parent ef66cab597
commit 3680e5b591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed issue with Alert group involved users filter
- Fixed email sending failure due to newline in title
## v1.1.34 (2023-03-08)

View file

@ -50,6 +50,6 @@ def build_subject_and_message(alert_group, emails_left):
)
title = str_or_backup(templated_alert.title, title_fallback)
subject = f"[{title}] You are invited to check an alert group"
subject = f"[{title}] You are invited to check an alert group".replace("\n", "")
return subject, content