Skip to content

Commit

Permalink
Fix html_text for None
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Jul 28, 2024
1 parent f9f525b commit 9a8ca9d
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 9a8ca9d

Please sign in to comment.