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 |
|
|
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 |
} |
} |
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"> |
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 |
|
|
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|\&|&|g; |
$s =~ s|&|&|g; |
521 |
$s =~ s|<|<|g; |
$s =~ s|<|<|g; |
522 |
$s =~ s|>|>|g; |
$s =~ s|>|>|g; |
523 |
$s =~ s|"|"|g; |
$s =~ s|"|"|g; |
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|\&|\&|g; |
$s =~ s|<|<|g; |
531 |
$s =~ s|\<|\<|g; |
$s =~ s|>|>|g; |
532 |
$s =~ s|\>|\>|g; |
$s =~ s|"|"|g; |
533 |
$s =~ s|\"|\"|g; |
$s =~ s|&|&|g; |
534 |
return $s; |
return $s; |
535 |
} |
} |
536 |
|
|
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} ? |