aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xblogthon.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 3c2df99..7cbda8c 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -123,8 +123,9 @@ except: errorpage("newest_first")
# Read POST Variables
action = cgi.FieldStorage()
month_display = action.getvalue('m')
-post_display = action.getvalue('p')
static_display = action.getvalue('s')
+post_display = action.getvalue('p')
+if post_display: post_display = re.sub(' ', '-', post_display)
allentries_display = action.getvalue('a')
feed_display = action.getvalue('feed')
if not month_display: month_display = ""
@@ -379,12 +380,12 @@ else:
title = title.replace('.' + entries_suffix, '')
if month_display == date_to_compare or not month_display:
- if post_display == title or not post_display:
+ if post_display == re.sub(' ', '-', title) or not post_display:
if allentries_display == "1" or entry_counter < entries_per_page:
content = open(entry, "r")
print ' <div class="entry">'
if permalinks:
- print ' <div class="entry_title"><a href="?p=' + title + '" class="entry_title">' + title + '</a></div>'
+ print ' <div class="entry_title"><a href="?p=' + re.sub(' ', '-', title) + '" class="entry_title">' + title + '</a></div>'
else:
print ' <div class="entry_title">' + title + '</div>'
print ' <div class="entry_date">' + date + '</div>'