Escape mentions for now

This commit is contained in:
Jeremy Zhang 2017-04-08 15:45:03 -07:00
parent 1a0f6a6089
commit f2096b36da

View File

@ -98,6 +98,8 @@ def check_user_in_guild(guild_id):
return 200 == discord_api.get_guild_member_nocache(guild_id, session['user_id'])['code'] and dbUser is not None return 200 == discord_api.get_guild_member_nocache(guild_id, session['user_id'])['code'] and dbUser is not None
def format_post_content(message): def format_post_content(message):
message = message.replace("<", "\<")
message = message.replace(">", "\>") #escape mentions for now
if (session['unauthenticated']): if (session['unauthenticated']):
message = "**[{}#{}]** {}".format(session['username'], session['user_id'], message) message = "**[{}#{}]** {}".format(session['username'], session['user_id'], message)
else: else: