summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2011-08-10 14:50:35 -0400
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2011-08-10 14:50:35 -0400
commite60f8a59931c286b9b3eeb81b76f558b016abbdb (patch)
tree388963f7740a21de5a6dc70311738713c0af0356
parent3f0fedac9053301e9bcfe07478e00463b06f46b1 (diff)
downloadaskbot-e60f8a59931c286b9b3eeb81b76f558b016abbdb.tar.gz
askbot-e60f8a59931c286b9b3eeb81b76f558b016abbdb.tar.bz2
askbot-e60f8a59931c286b9b3eeb81b76f558b016abbdb.zip
fixed mentions with differente capitalizations
-rw-r--r--askbot/models/base.py4
-rw-r--r--askbot/utils/markup.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/askbot/models/base.py b/askbot/models/base.py
index 58bf9ad3..80572b86 100644
--- a/askbot/models/base.py
+++ b/askbot/models/base.py
@@ -58,7 +58,7 @@ def parse_post_text(post):
extra_authors = set()
for name_seed in extra_name_seeds:
extra_authors.update(User.objects.filter(
- username__startswith = name_seed
+ username__istartswith = name_seed
)
)
@@ -67,7 +67,7 @@ def parse_post_text(post):
anticipated_authors += list(extra_authors)
mentioned_authors, post_html = markup.mentionize_text(
- text,
+ text,
anticipated_authors
)
diff --git a/askbot/utils/markup.py b/askbot/utils/markup.py
index 16e45f87..acb8d03d 100644
--- a/askbot/utils/markup.py
+++ b/askbot/utils/markup.py
@@ -40,7 +40,7 @@ def extract_first_matching_mentioned_author(text, anticipated_authors):
return None, ''
for a in anticipated_authors:
- if text.startswith(a.username):
+ if text.lower().startswith(a.username.lower()):
ulen = len(a.username)
if len(text) == ulen:
text = ''