aboutsummaryrefslogtreecommitdiff
path: root/error.cgi
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2019-01-07 22:03:42 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2019-01-07 22:03:42 +0100
commit89afd0a64110710c135b558614cdd755a181349b (patch)
treefa7a3be955e2abea55cf77161189080258db90ee /error.cgi
parent4429d6269252a329fa579e19ff1a32ce694a5a4d (diff)
code refactoring: better output encoding
Diffstat (limited to 'error.cgi')
-rwxr-xr-xerror.cgi7
1 files changed, 1 insertions, 6 deletions
diff --git a/error.cgi b/error.cgi
index 4b4f82f..b71e0c0 100755
--- a/error.cgi
+++ b/error.cgi
@@ -27,11 +27,6 @@ else
$d = Dudle.new(:title => _("Error"), :hide_lang_chooser => true, :load_extensions => false)
end
-def urlescape(str)
- CGI.escapeHTML(CGI.escape(str).gsub("+","%20"))
-end
-
-
if File.exists?($conf.errorlog)
begin
a = File.open($conf.errorlog,"r").to_a
@@ -50,7 +45,7 @@ end
errormessagebody = _("Hi!\n\nI found a bug in your application at %{urlofsite}.\nI did the following:\n\n<please describe what you did>\n<e.g., I wanted to post a comment to the poll.>\n\nI am using <please state your browser and operating system>\n%{errormessage}\nSincerely,\n") % {:errormessage => errormessage, :urlofsite => $conf.siteurl}
subject = _("Bug in Dudle")
- $d << _("An error occurred while executing Dudle.<br/>Please send an error report, including your browser, operating system, and what you did to %{admin}.") % {:admin => "<a href='mailto:#{$conf.bugreportmail}?subject=#{urlescape(subject)}&amp;body=#{urlescape(errormessagebody)}'>#{$conf.bugreportmail}</a>"}
+ $d << _("An error occurred while executing Dudle.<br/>Please send an error report, including your browser, operating system, and what you did to %{admin}.") % {:admin => "<a href='mailto:#{$conf.bugreportmail}?subject=#{CGI.escape(subject)}&amp;body=#{CGI.escape(errormessagebody)}'>#{$conf.bugreportmail}</a>"}
if (errorstr)
errorheadstr = _("Please include the following as well:")