summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/conf/ldap.py2
-rw-r--r--askbot/conf/login_providers.py4
-rw-r--r--askbot/conf/sidebar_question.py2
-rw-r--r--askbot/conf/words.py2
-rw-r--r--askbot/mail/parsing.py57
-rw-r--r--askbot/templates/moderation/queue.html2
-rw-r--r--askbot/tests/email_parsing_tests.py16
7 files changed, 79 insertions, 6 deletions
diff --git a/askbot/conf/ldap.py b/askbot/conf/ldap.py
index 7d384516..0b50352d 100644
--- a/askbot/conf/ldap.py
+++ b/askbot/conf/ldap.py
@@ -83,7 +83,7 @@ settings.register(
default = '',
help_text = _(
'Usually base DN mirrors domain name of your organization, '
- 'e.g. "dn=example,dn=com" when your site url is "example.com".'
+ 'e.g. "dn=example,dn=com" when your site url is "example.com". '
'This value is the "root" address of your LDAP directory.'
)
)
diff --git a/askbot/conf/login_providers.py b/askbot/conf/login_providers.py
index beb56a72..f4a5a24d 100644
--- a/askbot/conf/login_providers.py
+++ b/askbot/conf/login_providers.py
@@ -113,7 +113,9 @@ settings.register(
'SIGNIN_CUSTOM_OPENID_ENDPOINT',
default='http://example.com',
description=_('Custom OpenID endpoint'),
- help_text=_('Important: with the "username" mode must have a %%(username)s placeholder e.g. http://example.com/%%(username)s/'),
+ help_text=_('Important: with the "username" mode there must be a '
+ '%%(username)s placeholder e.g. '
+ 'http://example.com/%%(username)s/'),
)
)
diff --git a/askbot/conf/sidebar_question.py b/askbot/conf/sidebar_question.py
index fbd6b19e..4bdedcee 100644
--- a/askbot/conf/sidebar_question.py
+++ b/askbot/conf/sidebar_question.py
@@ -76,7 +76,7 @@ settings.register(
description = _('Custom sidebar header'),
default = '',
help_text = _(
- 'Use this area to enter content at the TOP of the sidebar'
+ 'Use this area to enter content at the TOP of the sidebar '
'in HTML format. When using this option '
'(as well as the sidebar footer), please '
'use the HTML validation service to make sure that '
diff --git a/askbot/conf/words.py b/askbot/conf/words.py
index be4eb191..5e12b111 100644
--- a/askbot/conf/words.py
+++ b/askbot/conf/words.py
@@ -224,7 +224,7 @@ settings.register(
WORDS,
'WORDS_QUESTIONS_COUNTABLE_FORMS',
default='question\nquestions',
- description=_('Countable plural forms for "queston"'),
+ description=_('Countable plural forms for "question"'),
help_text=_('Enter one form per line, pay attention')
)
)
diff --git a/askbot/mail/parsing.py b/askbot/mail/parsing.py
index ffec3ecc..e0a861b7 100644
--- a/askbot/mail/parsing.py
+++ b/askbot/mail/parsing.py
@@ -33,10 +33,11 @@ QUOTE_REGEXES = (
r'\nSubject: [^\n]+\nFrom: [^\n]+\nTo: [^\n]+\nDate: [^\n]+\Z',
#OUTLOOK_TEXT_QUOTE_RE =
r'\n_+\Z',
+ r'From:.*?\nSent:.*?\nTo:.*?\nSubject:.*?\Z',
)
-# extra samples
+# extra samples, separated with ####
"""
-----Original Message-----^M
From: forum@example.com [mailto:forum@example.com] ^M
@@ -44,6 +45,60 @@ Sent: Wednesday, August 07, 2013 11:00 AM^M
To: Jane Doe^M
Subject: "One more test question from email."^M
+##########
+
+________________________________
+ From: "nobody@example.com" <nobody@example.com>
+To: someone@rocketmail.com
+Sent: Wednesday, April 24, 2013 3:37 AM
+Subject: Welcome to Askbot
+
+##########
+
+On Wed, Jul 3, 2013 at 10:40 AM, <ask@example.org> wrote:
+
+> **
+> Evgeny, please reply to this message.
+>
+> Your post could not be published, because we could not detect signature in
+> your email.
+> This happened either because this is your first post or you have changed
+> your email signature.
+> Please make a simple response, without editing this message.
+> We will then attempt to detect the signature in your response and you
+> should be able to post.
+> ------------------------------
+>
+> Sincerely,
+> forum Administrator
+>
+> welcome-gofrnegwnwxgl9@example.org
+>
+
+
+
+--
+Askbot
+Valparaiso, Chile
+skype: aou aeu a u
+
+############
+Test from email
+
+From: ask@ask.example.org [mailto:ask@ask.example.org]
+Sent: Wednesday, July 03, 2013 10:41 AM
+To: John Doe
+Subject: aou aoeu oau aoeu aou aoeu oeau
+
+############
+
+
+-------- Original message --------
+From: forum@ask.examle.org
+Date:12/15/2013 2:35 AM (GMT-05:00)
+To: John Doe
+Subject: this is it
+
"""
diff --git a/askbot/templates/moderation/queue.html b/askbot/templates/moderation/queue.html
index 31d0b717..d97bbd36 100644
--- a/askbot/templates/moderation/queue.html
+++ b/askbot/templates/moderation/queue.html
@@ -39,7 +39,7 @@
{% if settings.IP_MODERATION_ENABLED %}
<li>Blocking IPs denies access by IP address and blocks all accounts using those IPs (and mass deletes content as above).</li>
{% endif %}
- <ul>
+ </ul>
{% include "moderation/manage_reject_reasons_dialog.html" %}
<div class="action-status"><span></span></div>
<div class="messages">
diff --git a/askbot/tests/email_parsing_tests.py b/askbot/tests/email_parsing_tests.py
index b87bbebe..10a0e194 100644
--- a/askbot/tests/email_parsing_tests.py
+++ b/askbot/tests/email_parsing_tests.py
@@ -63,6 +63,22 @@ Subject: "One more test question from email."
"""
self.assertEqual(mail.extract_reply(text), "some real text")
+ def test_some_other(self):
+ text = """some real text
+
+-------- Original message --------
+From: forum@example.com [mailto:forum@example.com]
+Sent: Wednesday, August 07, 2013 11:00 AM
+To: Jane Doe
+Subject: "One more test question from email."
+
+"""
+ self.assertEqual(mail.extract_reply(text), "some real text")
+
+ def test_some_other1(self):
+ text = 'some text here\n\n\n-------- Original message --------\nFrom: forum@example.com\nDate:12/15/2013 2:35 AM (GMT-05:00)\nTo: Some One\nSubject: some subject\n\n\n\n'
+ self.assertEqual(mail.extract_reply(text), 'some text here')
+
def test_blackberry(self):
text = """Lorem ipsum lorem ipsum