[sagenb] 101/179: convert to ascii and fix Cancel button in account recovery page
felix salfelder
felix-guest at moszumanska.debian.org
Tue May 6 12:05:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository sagenb.
commit 83714e762c6c45ab04210b1861e0287973084bfb
Author: P Purkayastha <ppurka at gmail.com>
Date: Sat Apr 27 23:53:04 2013 +0800
convert to ascii and fix Cancel button in account recovery page
---
sagenb/data/sage/html/accounts/account_recovery.html | 13 +++++++------
sagenb/notebook/smtpsend.py | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/sagenb/data/sage/html/accounts/account_recovery.html b/sagenb/data/sage/html/accounts/account_recovery.html
index 6311a27..4354278 100644
--- a/sagenb/data/sage/html/accounts/account_recovery.html
+++ b/sagenb/data/sage/html/accounts/account_recovery.html
@@ -6,16 +6,17 @@
{% block body %}
<div id="wrapper">
<h1>{{ gettext('Account Recovery') }}</h1>
- <p>{{ gettext("A new password will be emailed to the email address connected to your account. However if you didn't confirm your email address you will be unable to recover your account.") }}</p>
+ <p>{{ gettext("A new password will be emailed to the email address connected to your account. However if you didn't confirm your email address you will be unable to recover your account.") }}</p>
- <form method="GET" action="/forgotpass">
+ <form method="GET" action="/forgotpass" style="display: inline;">
<div>
<label for="username">{{ gettext('Username') }}</label>
<input type="text" name="username" size="15" />
</div>
- <div>
- <button type="submit">{{ gettext('Submit') }}</button> <a href="/"><button >{{ gettext('Cancel') }}</button></a>
- </div>
-</form>
+ <button type="submit">{{ gettext('Submit') }}</button>
+ </form>
+ <form method="GET" action="/" style="display: inline;">
+ <button >{{ gettext('Cancel') }}</button>
+ </form>
</div>
{% endblock %}
diff --git a/sagenb/notebook/smtpsend.py b/sagenb/notebook/smtpsend.py
index db88dcd..0dc508b 100644
--- a/sagenb/notebook/smtpsend.py
+++ b/sagenb/notebook/smtpsend.py
@@ -41,8 +41,8 @@ def handleError(error):
def send_mail(fromaddr, toaddr, subject, body, on_success=sendComplete, on_failure=handleError):
try:
- recpt_domain = toaddr.split('@')[1]
- except (ValueError, IndexError):
+ recpt_domain = toaddr.split('@')[1].encode("ascii")
+ except (ValueError, IndexError, UnicodeDecodeError):
raise ValueError, "mal-formed destination address"
message = buildMessage(fromaddr, toaddr, subject, body)
messageData = message.as_string(unixfrom=False)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git
More information about the debian-science-commits
mailing list