[system] / trunk / webwork2 / lib / Apache / WeBWorK.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/Apache/WeBWorK.pm

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

Revision 6634 Revision 6635
182=cut 182=cut
183 183
184sub htmlMessage($$$@) { 184sub htmlMessage($$$@) {
185 my ($r, $warnings, $exception, @backtrace) = @_; 185 my ($r, $warnings, $exception, @backtrace) = @_;
186 186
187 $warnings = htmlEscape($warnings);
188 $exception = htmlEscape($exception);
189
187 my @warnings = defined $warnings ? split m/\n+/, $warnings : (); 190 my @warnings = defined $warnings ? split m/\n+/, $warnings : ();
188 $warnings = htmlWarningsList(@warnings); 191 $warnings = htmlWarningsList(@warnings);
189 $exception = htmlEscape($exception);
190 my $backtrace = htmlBacktrace(@backtrace); 192 my $backtrace = htmlBacktrace(@backtrace);
191 193
192 my $admin = ($ENV{SERVER_ADMIN} 194 my $admin = ($ENV{SERVER_ADMIN}
193 ? " (<a href=\"mailto:$ENV{SERVER_ADMIN}\">$ENV{SERVER_ADMIN}</a>)" 195 ? " (<a href=\"mailto:$ENV{SERVER_ADMIN}\">$ENV{SERVER_ADMIN}</a>)"
194 : ""); 196 : "");
195 my $time = time2str("%a %b %d %H:%M:%S %Y", time); 197 my $time = time2str("%a %b %d %H:%M:%S %Y", time);
196 my $method = $r->method; 198 my $method = htmlEscape( $r->method );
197 my $uri = $r->uri; 199 my $uri = htmlEscape( $r->uri );
198 my $headers = do { 200 my $headers = do {
199 my %headers = MP2 ? %{$r->headers_in} : $r->headers_in; 201 my %headers = MP2 ? %{$r->headers_in} : $r->headers_in;
200 join("", map { "<tr><td><small>$_</small></td><td><small>$headers{$_}</small></td></tr>" } keys %headers); 202 join("", map { "<tr><td><small>" . htmlEscape($_). "</small></td><td><small>" .
203 htmlEscape($headers{$_}) . " </small></td></tr>" } keys %headers);
201 }; 204 };
202 205
203 return <<EOF; 206 return <<EOF;
204<div style="text-align:left"> 207<div style="text-align:left">
205 <h2>WeBWorK error</h2> 208 <h2>WeBWorK error</h2>

Legend:
Removed from v.6634  
changed lines
  Added in v.6635

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9