remove the greater than symbol from the md sanitization method since it causes issues and does not seem to help w/ burnettk (#1685)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
parent
9150bb74b0
commit
10b30f6c14
|
@ -34,7 +34,10 @@ class JinjaHelpers:
|
|||
def sanitize_for_md(cls, value: str) -> str:
|
||||
"""Sanitizes given value for markdown."""
|
||||
# modified from https://github.com/python-telegram-bot/python-telegram-bot/blob/1fdaaac8094c9d76c34c8c8e8c9add16080e75e7/telegram/utils/helpers.py#L149
|
||||
escape_chars = r"_*[]()~`>#+-=|{}!"
|
||||
#
|
||||
# > was in this list but was removed because it doesn't seem to cause any
|
||||
# issues and if it is in the list it prints like ">" instead
|
||||
escape_chars = r"_*[]()~`#+-=|{}!"
|
||||
escaped_value = re.sub(f"([{re.escape(escape_chars)}])", r"\\\1", value)
|
||||
escaped_value = escaped_value.replace("\n", "").replace("\r", "")
|
||||
return escaped_value
|
||||
|
|
Loading…
Reference in New Issue