Skip to content

Commit 4fddad2

Browse files
committed
Notification body should not contain \n
1 parent f3d55db commit 4fddad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tigaserver_app/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,10 +3332,10 @@ def get_body(self, language_code: Optional[str] = None) -> str:
33323332
soup = BeautifulSoup(body_html, 'html.parser')
33333333
body = soup.find('body') # Try to find the <body> tag
33343334
if body:
3335-
return body.get_text(separator='\n', strip=True) # If <body> is found, extract text
3335+
return body.get_text(separator=' ', strip=True) # If <body> is found, extract text
33363336
else:
33373337
# If no <body> tag is found, return text from the entire HTML document
3338-
return soup.get_text(separator='\n', strip=True)
3338+
return soup.get_text(separator=' ', strip=True)
33393339

33403340
def save(self, *args, **kwargs):
33413341
if not (self.title_native and self.body_html_native):

0 commit comments

Comments
 (0)