Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/helpers/logged_exceptions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ def page_title(text)
# Rescue textilize call if RedCloth is not available.
def pretty_format(text)
begin
textilize(text).html_safe
txt = textilize(text).html_safe
rescue
simple_format(text).html_safe
txt = simple_format(text).html_safe
end
# In Ruby 1.9.x, Encoding is defined, so we force our default encoding
# to work around this Ruby 1.9 error:
# Encoding::CompatibilityError in LoggedExceptions/show
# "incompatible character encodings: ASCII-8BIT and UTF-8"
defined?(Encoding) ? txt.encode(Encoding.default_internal.to_s, undef: :replace) : txt
end
end