summaryrefslogtreecommitdiff
path: root/lib/webrick/log.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/log.rb')
-rw-r--r--lib/webrick/log.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/log.rb b/lib/webrick/log.rb
index 7542d8f..41e907c 100644
--- a/lib/webrick/log.rb
+++ b/lib/webrick/log.rb
@@ -118,10 +118,10 @@ module WEBrick
# * Otherwise it will return +arg+.inspect.
def format(arg)
if arg.is_a?(Exception)
- "#{arg.class}: #{arg.message}\n\t" <<
+ "#{arg.class}: #{AccessLog.escape(arg.message)}\n\t" <<
arg.backtrace.join("\n\t") << "\n"
elsif arg.respond_to?(:to_str)
- arg.to_str
+ AccessLog.escape(arg.to_str)
else
arg.inspect
end