Spaces:
Running
Running
peter szemraj
commited on
Commit
·
6f102ed
1
Parent(s):
dfd722b
replace all newline chars with a whitespace
Browse files
utils.py
CHANGED
@@ -68,4 +68,7 @@ def make_email_link(
|
|
68 |
# strip brackets and other HTML-tag characters from body with regex
|
69 |
body = re.sub(r"<[^>]*>", tag_placeholder, body)
|
70 |
|
|
|
|
|
|
|
71 |
return f'<a href="mailto:%20?subject={subject}&body={body}">{link_text}</a>'
|
|
|
68 |
# strip brackets and other HTML-tag characters from body with regex
|
69 |
body = re.sub(r"<[^>]*>", tag_placeholder, body)
|
70 |
|
71 |
+
# replace all newline chars with a whitespace
|
72 |
+
body = body.replace("\n", " ")
|
73 |
+
|
74 |
return f'<a href="mailto:%20?subject={subject}&body={body}">{link_text}</a>'
|