Skip to content

Commit

Permalink
Escape exception message for HTML display
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Mar 27, 2023
1 parent 45d046a commit 6d31e11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'no.datek'
version '0.2.0'
version '0.2.1'
final String JRUBY_VERSION = '9.3.6.0';

repositories {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ruby/slim_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def params.[](key)
#{e.backtrace.join("\n")}
HTML
LOG.error message
"<h1>Whoops!</h1><pre>#{message}</pre>"
"<h1>Whoops!</h1><pre>#{CGI.escapeHTML(message)}</pre>"
end

# self in this context is the Struct with the context variables
Expand Down

0 comments on commit 6d31e11

Please sign in to comment.