/[pub]/suikawiki/script/wiki.cgi
Suika

Diff of /suikawiki/script/wiki.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by wakaba, Sun Jun 30 07:52:46 2002 UTC revision 1.23 by wakaba, Sun Aug 18 04:14:35 2002 UTC
# Line 344  sub do_search { Line 344  sub do_search {
344      &print_header($SearchPage);      &print_header($SearchPage);
345      &print_searchform(&escape($word));      &print_searchform(&escape($word));
346      print get_search_result ($word, -output_not_found => 1);      print get_search_result ($word, -output_not_found => 1);
347        print "foo";
348      &print_footer($SearchPage);      &print_footer($SearchPage);
349  }  }
350    
# Line 358  sub get_search_result ($;%) { Line 359  sub get_search_result ($;%) {
359          || index ($page, $word) > 0          || index ($page, $word) > 0
360          || index ($word, $page) > 0          || index ($word, $page) > 0
361         ) {         ) {
362        $r .= qq(<li><a href ="$url_cgi?@{[&encode($page)]}">$page</a>@{[&escape(&get_subjectline($page))]}</li>);        $r .= qq(<li><a href ="$url_cgi?@{[&escape(&encode($page))]}">@{[&escape($page)]}</a>@{[&escape(&get_subjectline($page))]}</li>);
363        $counter++;        $counter++;
364      }      }
365    }    }
# Line 419  Content-Style-Type: text/css Line 420  Content-Style-Type: text/css
420      "http://www.w3.org/TR/html4/loose.dtd">      "http://www.w3.org/TR/html4/loose.dtd">
421  <html lang="$lang">  <html lang="$lang">
422  <head>  <head>
423      <title>$page @{[&escape(&get_subjectline($page))]}</title>      <title>@{[&escape($page.' '.&get_subjectline($page))]}</title>
424      <link rel="index" href="$url_cgi?$IndexPage">      <link rel="index" href="$url_cgi?$IndexPage">
425      <link rev="made" href="mailto:$modifier_mail">      <link rev="made" href="mailto:$modifier_mail">
426      <link rel="stylesheet" type="text/css" href="$url_stylesheet">      <link rel="stylesheet" type="text/css" href="$url_stylesheet">
# Line 430  EOD Line 431  EOD
431    print <<EOD;    print <<EOD;
432  <h1 class="header"><a  <h1 class="header"><a
433      title="$resource{searchthispage}"      title="$resource{searchthispage}"
434      href="$url_cgi?mycmd=search;mymsg=$cookedpage">$page</a>@{[&escape(&get_subjectline($page))]}</h1>      href="$url_cgi?mycmd=search;mymsg=$cookedpage">@{[&escape($page)]}</a>@{[&escape(&get_subjectline($page))]}</h1>
435  EOD  EOD
436  }  }
437    
# Line 516  EOD Line 517  EOD
517  sub escape {  sub escape {
518      my $s = shift;      my $s = shift;
519      $s =~ s|\r\n|\n|g;      $s =~ s|\r\n|\n|g;
520      $s =~ s|\&|&amp;|g;      $s =~ s|&|&amp;|g;
521      $s =~ s|<|&lt;|g;      $s =~ s|<|&lt;|g;
522      $s =~ s|>|&gt;|g;      $s =~ s|>|&gt;|g;
523      $s =~ s|"|&quot;|g;      $s =~ s|"|&quot;|g;
# Line 526  sub escape { Line 527  sub escape {
527  sub unescape {  sub unescape {
528      my $s = shift;      my $s = shift;
529      # $s =~ s|\n|\r\n|g;      # $s =~ s|\n|\r\n|g;
530      $s =~ s|\&amp;|\&|g;      $s =~ s|&lt;|<|g;
531      $s =~ s|\&lt;|\<|g;      $s =~ s|&gt;|>|g;
532      $s =~ s|\&gt;|\>|g;      $s =~ s|&quot;|"|g;
533      $s =~ s|\&quot;|\"|g;      $s =~ s|&amp;|&|g;
534      return $s;      return $s;
535  }  }
536    
# Line 980  sub print_editform { Line 981  sub print_editform {
981  <form action="$url_cgi" method="post">  <form action="$url_cgi" method="post">
982      @{[ $mode{admin} ? qq($resource{frozenpassword} <input type="password" name="mypassword" value="$form{mypassword}" size="10"><br>) : "" ]}      @{[ $mode{admin} ? qq($resource{frozenpassword} <input type="password" name="mypassword" value="$form{mypassword}" size="10"><br>) : "" ]}
983      <input type="hidden" name="myLastModified" value="$lastmodified">      <input type="hidden" name="myLastModified" value="$lastmodified">
984      <input type="hidden" name="mypage" value="$form{mypage}">      <input type="hidden" name="mypage" value="@{[&escape($form{mypage})]}">
985      <textarea cols="$cols" rows="$rows" name="mymsg" wrap="off" tabindex="1">$mymsg</textarea><br>      <textarea cols="$cols" rows="$rows" name="mymsg" wrap="off" tabindex="1">$mymsg</textarea><br>
986  @{[  @{[
987      $mode{admin} ?      $mode{admin} ?

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24