diff options
Diffstat (limited to 'Mailman/Cgi/listinfo.py')
-rw-r--r-- | Mailman/Cgi/listinfo.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py index 91f5b6bb..bab460b6 100644 --- a/Mailman/Cgi/listinfo.py +++ b/Mailman/Cgi/listinfo.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2017 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2018 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -21,6 +21,7 @@ # No lock needed in this script, because we don't change data. import os +import re import cgi import time @@ -245,12 +246,14 @@ 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> </td><td> - <script src="https://www.google.com/recaptcha/api.js"></script> + <script src="https://www.google.com/recaptcha/api.js?hl=%s"> + </script> <div class="g-recaptcha" data-sitekey="%s"></div> </td></tr>""" - % mm_cfg.RECAPTCHA_SITE_KEY) + % (rlang, mm_cfg.RECAPTCHA_SITE_KEY)) else: replacements['<mm-recaptcha-ui>'] = '' |