Permalink bugfix

This commit is contained in:
Stefan Ritter 2009-07-10 08:58:30 +02:00
parent ae50a9d0e9
commit 7f2404fba2

View File

@ -457,7 +457,7 @@ else:
comments_file = glob.glob(entries_dir + title + '.comments') comments_file = glob.glob(entries_dir + title + '.comments')
if not comments_file and not post_display: if not comments_file and not post_display:
print ' <div class="entry_comment">' print ' <div class="entry_comment">'
print ' <a href="?p=' + title + '" class="entry_comment">no comments</a>' print ' <a href="?p=' + re.sub(' ','-', title) + '" class="entry_comment">no comments</a>'
print ' </div>' print ' </div>'
print ' </div>' print ' </div>'
print '' print ''
@ -467,7 +467,7 @@ else:
for line in comments_content: for line in comments_content:
if line.split(".", 1)[0] == "-": comments_counter += 1 if line.split(".", 1)[0] == "-": comments_counter += 1
print ' <div class="entry_comment">' print ' <div class="entry_comment">'
print ' <a href="?p=' + title + '" class="entry_comment">comments (' + str(comments_counter) + ')</a>' print ' <a href="?p=' + re.sub(' ', '-', title) + '" class="entry_comment">comments (' + str(comments_counter) + ')</a>'
print ' </div>' print ' </div>'
print ' </div>' print ' </div>'
print '' print ''