summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-07 09:23:13 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-07 09:23:13 +0000
commitc69d6f669a696031ad91620f3db137bb65c673f2 (patch)
tree6e743eed62e43caee33bf4482a51779b21f34a31 /IkiWiki
parentde871490391f5322d84895f140222b4d0c499509 (diff)
* The slash escaping when adding to a blog from the CGI was not working
since it ended up being double-escaped. Instead, just remove slashes. * Fix some nasty issues with page name escaping during previewing (introduced in 1.44).
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 8d86d8d3e..b884a32f2 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -466,8 +466,8 @@ sub cgi_editpage ($$) { #{{{
$form->tmpl_param("page_select", 1);
$form->field(name => "page", type => 'select',
- options => { map { $_ => pagetitle($_, 1) } @editable_locs },
- value => $best_loc);
+ options => [ map { pagetitle($_, 1) } @editable_locs ],
+ value => pagetitle($best_loc, 1));
$form->field(name => "type", type => 'select',
options => \@page_types);
$form->title(sprintf(gettext("creating %s"), pagetitle($page)));
@@ -681,8 +681,8 @@ sub cgi (;$$) { #{{{
cgi_editpage($q, $session);
}
elsif ($do eq 'blog') {
- my $page=titlepage(decode_utf8($q->param('title')));
- $page=~s/(\/)/"__".ord($1)."__"/eg; # escape slashes too
+ my $page=decode_utf8($q->param('title'));
+ $page=~s/\// /g; # remove slashes to avoid accidental subpages
# if the page already exists, munge it to be unique
my $from=$q->param('from');
my $add="";