aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-02-03 18:00:40 -0800
committerMark Sapiro <mark@msapiro.net>2018-02-03 18:00:40 -0800
commitbcd476a43f2365a48db8c17d0a7076b6a2e0ce92 (patch)
treecd0dca46268439c07dd566f6d4c130f27a5c3f61 /Mailman
parent0a2b48210b27165b0cfe8f1835a6e9ffae3f6ea2 (diff)
downloadmailman2-bcd476a43f2365a48db8c17d0a7076b6a2e0ce92.tar.gz
mailman2-bcd476a43f2365a48db8c17d0a7076b6a2e0ce92.tar.xz
mailman2-bcd476a43f2365a48db8c17d0a7076b6a2e0ce92.zip
It's not necessary to replace _ with - in language codes for reCAPTCHA.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Cgi/listinfo.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py
index bab460b6..428834ba 100644
--- a/Mailman/Cgi/listinfo.py
+++ b/Mailman/Cgi/listinfo.py
@@ -21,7 +21,6 @@
# No lock needed in this script, because we don't change data.
import os
-import re
import cgi
import time
@@ -246,14 +245,13 @@ def list_listinfo(mlist, lang):
replacements['<mm-fullname-box>'] = mlist.FormatBox('fullname', size=30)
# If reCAPTCHA is enabled, display its user interface
if mm_cfg.RECAPTCHA_SITE_KEY:
- rlang = re.sub('_', '-', lang)
replacements['<mm-recaptcha-ui>'] = (
"""<tr><td>&nbsp;</td><td>
<script src="https://www.google.com/recaptcha/api.js?hl=%s">
</script>
<div class="g-recaptcha" data-sitekey="%s"></div>
</td></tr>"""
- % (rlang, mm_cfg.RECAPTCHA_SITE_KEY))
+ % (lang, mm_cfg.RECAPTCHA_SITE_KEY))
else:
replacements['<mm-recaptcha-ui>'] = ''