Merge soutade.fr:dynastie
This commit is contained in:
commit
c142815915
4
views.py
4
views.py
|
@ -554,7 +554,7 @@ def add_comment(request, post_id, parent_id):
|
|||
comment_index = str(len(comments))
|
||||
for comment in comments:
|
||||
email = comment.email
|
||||
if email != '' and not email in emails:
|
||||
if email != '' and email != request.POST['email'] and not email in emails:
|
||||
emails[email] = comment.author
|
||||
|
||||
if len(emails) > 0:
|
||||
|
@ -572,7 +572,7 @@ def add_comment(request, post_id, parent_id):
|
|||
|
||||
html_body = u'<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body>'
|
||||
html_body += u'Bonjour %s,<br/><br/>Un nouveau commentaire a été posté pour l\'article "%s".<br/><br/>' % (author, post.title)
|
||||
html_body = html_body + u'Pour le consulter, rendez vous sur <a href="http://%s%s#comment_%s">http://%s/%s#comment_%s</a><br/><br/>----------------<br/><pre>' % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
|
||||
html_body = html_body + u'Pour le consulter, rendez vous sur <a href="http://%s%s#comment_%s">http://%s%s#comment_%s</a><br/><br/>----------------<br/><pre>' % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
|
||||
c = comment.the_comment
|
||||
# Avoid script injection
|
||||
c = c.replace('<pre>', '<pre>')
|
||||
|
|
Loading…
Reference in New Issue
Block a user