changeset 707:dfe4b0291daa

server_side: remove unwanted "target" property in the HTTP to HTTPS link + use "<p>" instead of "<br>"
author souliane <souliane@mailoo.org>
date Sun, 07 Jun 2015 13:17:05 +0200
parents fe03637fe5a6
children e9a6cbb924e6
files src/server/server.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/server/server.py	Fri Jun 05 21:16:45 2015 +0200
+++ b/src/server/server.py	Sun Jun 07 13:17:05 2015 +0200
@@ -850,15 +850,18 @@
         """@return: a security warning message, or None if the connection is secure"""
         if self.request.URLPath().scheme == 'https' or not self.sat_host.security_warning:
             return None
-        text = D_("You are about to connect to an unsecure service.")
+        text = "<p>" + D_("You are about to connect to an unsecure service.") + "</p><p>&nbsp;</p><p>"
+
         if self.sat_host.connection_type == 'both':
             new_port = (':%s' % self.sat_host.port_https_ext) if self.sat_host.port_https_ext != HTTPS_PORT else ''
             url = "https://%s" % self.request.URLPath().netloc.replace(':%s' % self.sat_host.port, new_port)
-            text += D_('<br />Please read our %(faq_prefix)ssecurity notice%(faq_suffix)s regarding HTTPS') % {'faq_prefix': '<a href="http://salut-a-toi.org/faq.html#https" target="#">', 'faq_suffix': '</a>'}
-            text += D_('<br />and use the secure version of this website:<br /><a href="%(url)s" target="#">%(url)s</a>') % {'url': url}
+            text += D_('Please read our %(faq_prefix)ssecurity notice%(faq_suffix)s regarding HTTPS') % {'faq_prefix': '<a href="http://salut-a-toi.org/faq.html#https" target="#">', 'faq_suffix': '</a>'}
+            text += "</p><p>" + D_('and use the secure version of this website:')
+            text += '</p><p>&nbsp;</p><p align="center"><a href="%(url)s">%(url)s</a>' % {'url': url}
         else:
             text += D_('You should ask the administrator of %(url)s to turn on HTTPS.')
-        return text
+
+        return text + "</p><p>&nbsp;</p>"
 
 
 class SignalHandler(jsonrpc.JSONRPC):