]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
web commit by JamesWestby: Add a note about Markdown vs. Text::Markdown
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 6e1efbd69927f1199b0af6ccee45285d8ef7ea81..01c5812ef03dd134c8078d40b25d7b6c1d066395 100644 (file)
@@ -77,11 +77,12 @@ sub cgi_recentchanges ($) { #{{{
        memoize("htmllink");
 
        eval q{use Time::Duration};
+       eval q{use CGI 'escapeHTML'};
 
        my $changelog=[rcs_recentchanges(100)];
        foreach my $change (@$changelog) {
                $change->{when} = concise(ago($change->{when}));
-               $change->{user} = htmllink("", "", $change->{user}, 1);
+               $change->{user} = htmllink("", "", escapeHTML($change->{user}), 1);
                $change->{pages} = [
                        map {
                                $_->{link} = htmllink("", "", $_->{page}, 1);
@@ -430,7 +431,6 @@ sub cgi_editpage ($$) { #{{{
                return;
        }
        elsif ($form->submitted eq "Preview") {
-               require IkiWiki::Render;
                my $content=$form->field('editcontent');
                my $comments=$form->field('comments');
                $form->field(name => "editcontent",
@@ -614,7 +614,7 @@ sub cgi () { #{{{
                cgi_hyperestraier();
        }
        
-       CGI::Session->name("ikiwiki_session_$config{wikiname}");
+       CGI::Session->name("ikiwiki_session_".encode_utf8($config{wikiname}));
        
        my $oldmask=umask(077);
        my $session = CGI::Session->new("driver:DB_File", $q,