~mailman-coders/mailman/2.1

« back to all changes in this revision

Viewing changes to Mailman/htmlformat.py

  • Committer: Mark Sapiro
  • Date: 2021-11-22 04:31:11 UTC
  • Revision ID: mark@msapiro.net-20211122043111-v9n55ud4tk337ks6
Avoid NotAMemberError in CSRF check from user options page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
495
495
    def __init__(self, name, text='', rows=None, cols=None, wrap='soft',
496
496
                 readonly=0):
497
497
        if isinstance(text, str):
498
 
            safetext = Utils.websafe(text)
 
498
            # Double escape HTML entities in non-readonly areas.
 
499
            doubleescape = not readonly
 
500
            safetext = Utils.websafe(text, doubleescape)
499
501
        else:
500
502
            safetext = text
501
503
        self.name = name