Skip to content

Commit

Permalink
Merge pull request #2356 from Badiboy/master
Browse files Browse the repository at this point in the history
Fix html_text for None
  • Loading branch information
Badiboy authored Jul 28, 2024
2 parents 1a47edf + 9a8ca9d commit bd48956
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,8 @@ def html_text(self):
"""
Returns html-rendered text.
"""
if self.text is None:
return None
return apply_html_entities(self.text, self.entities, getattr(self, "custom_subs", None))

@property
Expand Down Expand Up @@ -9067,6 +9069,8 @@ def html_text(self):
"""
Returns html-rendered text.
"""
if self.text is None:
return None
return apply_html_entities(self.text, self.entities, getattr(self, "custom_subs", None))


Expand Down

0 comments on commit bd48956

Please sign in to comment.