diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2018-06-22 09:34:52 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2018-06-22 09:34:52 +0900 |
commit | 981cf5eaa82259488eec0922bf2aeb07ea3bedaf (patch) | |
tree | 9964d5e28be2e93dcf0343516636c8e956e4a182 /Mailman | |
parent | 6a3bbdd20a8fac82f161f353c40604387f52cb09 (diff) | |
download | mailman2-981cf5eaa82259488eec0922bf2aeb07ea3bedaf.tar.gz mailman2-981cf5eaa82259488eec0922bf2aeb07ea3bedaf.tar.xz mailman2-981cf5eaa82259488eec0922bf2aeb07ea3bedaf.zip |
* apply Utils.websafe() to description string in admin.py
* Use GetDescription() in HTMLFormatter.py
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Cgi/admin.py | 2 | ||||
-rw-r--r-- | Mailman/HTMLFormatter.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index f028052d..a92ab378 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -295,7 +295,7 @@ def admin_overview(msg=''): else: advertised.append((mlist.GetScriptURL('admin'), mlist.real_name, - mlist.GetDescription())) + Utils.websafe(mlist.GetDescription()))) # Greeting depends on whether there was an error or not if msg: greeting = FontAttr(msg, color="ff5060", size="+1") diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py index 93686899..098a2881 100644 --- a/Mailman/HTMLFormatter.py +++ b/Mailman/HTMLFormatter.py @@ -389,11 +389,16 @@ class HTMLFormatter: listlangs = _(Utils.GetLanguageDescr(self.preferred_language)) else: listlangs = self.GetLangSelectBox(lang).Format() + if lang: + cset = Utils.GetCharSet(lang) or 'us-ascii' + else: + cset = Utils.GetCharSet(self.preferred_language) or 'us-ascii' d = { '<mm-mailman-footer>' : self.GetMailmanFooter(), '<mm-list-name>' : self.real_name, '<mm-email-user>' : self._internal_name, - '<mm-list-description>' : Utils.websafe(self.description), + '<mm-list-description>' : + Utils.websafe(self.GetDescription(cset)), '<mm-list-info>' : '<!---->' + BR.join(self.info.split(NL)) + '<!---->', '<mm-form-end>' : self.FormatFormEnd(), |