diff --git a/src/api.py b/src/api.py index ed6058f..eb14994 100644 --- a/src/api.py +++ b/src/api.py @@ -443,7 +443,7 @@ async def post_endpoint( message_reply_message=message_reply_message, message_reply_author=message_reply_author, message_author_id=message_author_id, - message_content=message_content, + message_content=astroidapi.formatter.Format.unformat_urlsafe(message_content), message_attachments=message_attachments, message_embed=message_embed, selfuse=selfuse, diff --git a/src/astroidapi/formatter.py b/src/astroidapi/formatter.py index e4ec39c..164ff29 100644 --- a/src/astroidapi/formatter.py +++ b/src/astroidapi/formatter.py @@ -11,3 +11,7 @@ def format_username(cls, username: str): @classmethod def format_urlsafe(cls, message: str): message = message.replace("?", "%3F").replace("&", "%26") + + @classmethod + def unformat_urlsafe(cls, message: str): + message = message.replace("%3F", "?").replace("%26", "&")