~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/util.py

  • Committer: franku
  • Date: 2018-10-03 20:34:49 UTC
  • mfrom: (497.3.4 cookies)
  • Revision ID: somal@arcor.de-20181003203449-z7rnyrt4qsqaebvq
Use a session based csrf cookie; Fixed showing deleted username when quoting a post

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
 
171
171
def quote_text(text, user, markup):
172
172
    """Quote message using selected markup."""
173
 
    text = '*' + user.username + ' wrote:*\n\n' + text
 
173
 
 
174
    quoted_username = settings.DELETED_USERNAME if user.wlprofile.deleted else user.username
 
175
 
 
176
    text = '*' + quoted_username + ' wrote:*\n\n' + text
174
177
 
175
178
    if markup == 'markdown':
176
179
        # Inserting a space after ">" will not change the generated HTML,