Replace _ in username to avoid markdown issues

When gifting a user gold, it displays their username using markdown,
so any underscores need to be replaced first to avoid having part of
a username between them interpreted as italics.

Fixes issue #714
This commit is contained in:
Chad Birch
2013-03-12 15:40:17 -06:00
parent a182078fcd
commit 728913bcec

View File

@@ -1935,7 +1935,8 @@ class GoldPayment(Templated):
if not clone_template:
summary = format % dict(
amount=Score.somethings(months, "month"),
recipient=recipient and recipient.name,
recipient=recipient and
recipient.name.replace('_', '_'),
)
else:
# leave the replacements to javascript