10 our @ISA = qw(Exporter);
11 our @EXPORT = qw(html_esc);
13 use CGI
qw(:standard :escapeHTML -nosticky);
14 use CGI
::Util
qw(unescape);
15 use CGI
::Carp
qw(fatalsToBrowser);
21 my ($heading, $section) = @_;
24 $section ||= 'administration';
26 $gcgi->{cgi
} = CGI
->new;
28 my $cgiurl = $gcgi->{cgi
}->url(-absolute
=> 1);
29 ($gcgi->{srcname
}) = ($cgiurl =~ m
#^.*/\([a-zA-Z0-9_.\/-]+?\.cgi\)$#); #
30 $gcgi->{srcname
} = "cgi/".$gcgi->{srcname
} if $gcgi->{srcname
};
32 print $gcgi->{cgi
}->header(-type
=>'text/html', -charset
=> 'utf-8');
35 <?xml version="1.0" encoding="utf-8"?>
36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
37 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
40 <title>$Girocco::Config::name :: $heading</title>
41 <link rel="stylesheet" type="text/css" href="$Girocco::Config::gitwebfiles/gitweb.css"/>
42 <link rel="stylesheet" type="text/css" href="$Girocco::Config::gitwebfiles/girocco.css"/>
43 <link rel="shortcut icon" href="$Girocco::Config::gitwebfiles/git-favicon.png" type="image/png"/>
44 <script src="$Girocco::Config::gitwebfiles/mootools.js" type="text/javascript"></script>
45 <script src="$Girocco::Config::gitwebfiles/girocco.js" type="text/javascript"></script>
50 <div class="page_header">
51 <a href="http://git.or.cz/" title="Git homepage"><img src="$Girocco::Config::gitwebfiles/git-logo.png" width="72" height="27" alt="git" style="float:right; border-width:0px;"/></a>
52 <a href="$Girocco::Config::gitweburl">$Girocco::Config::name</a> / $section / $heading
62 if ($self->{srcname
} and $Girocco::Config
::giroccourl
) {
65 <a href="$Girocco::Config::giroccourl?a=blob;f=$self->{srcname}">(view source)</a>
82 print "<p style=\"color: red\">@_</p>\n";
88 my $err = $self->{err
};
89 $err and print "<p style=\"font-weight: bold\">Operation aborted due to $err errors.</p>\n";
96 my $val = $self->{cgi
}->param($param);
97 defined $val and $val =~ s/^\s*(.*?)\s*$/$1/;
104 $self->{srcname
} = $srcname if $srcname;
111 $str =~ s/</</g; $str =~ s/>/>/g;
112 $str =~ s/"/"/g;