#{title}
END def urlescape(str) CGI.escapeHTML(CGI.escape(str).gsub("+","%20")) end if defined?(ERRORLOG) begin a = File.open(ERRORLOG,"r").to_a rescue Exception => e errorstr = "Exception while opening #{ERRORLOG}:\n#{e}" else s = [a.pop] s << a.pop while s.last.scan(/^\[([^\]]*)\] \[/).flatten[0] == a.last.scan(/^\[([^\]]*)\] \[/).flatten[0] || a.last =~ /^[^\[]/ errorstr = s.reverse.join end errormessage = "\n" + _("The following error was printed:") + "\n" + errorstr end errormessagebody = _("Hi!\n\nI found a bug in your application at %{urlofsite}.\nI did the following:\n\nPlease send an error report, including your browser, operating system, and what you did to %{admin}.") % {:admin => "#{BUGREPORTMAIL}"} if (errorstr) errorheadstr = _("Please include the following as well:") $h << <
#{CGI.escapeHTML(errorstr)}ERROR end $h << "