mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-20 05:04:28 -05:00
HTML escape error message
This commit is contained in:
parent
53d349a648
commit
76cc8ac66b
@ -38,12 +38,15 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce
|
|||||||
|
|
||||||
issue_title = "#{exception.message} (#{exception.class})"
|
issue_title = "#{exception.message} (#{exception.class})"
|
||||||
|
|
||||||
issue_template = %(Title: `#{issue_title}`)
|
issue_template = <<-TEXT
|
||||||
issue_template += %(\nDate: `#{Time::Format::ISO_8601_DATE_TIME.format(Time.utc)}`)
|
Title: `#{HTML.escape(issue_title)}`
|
||||||
issue_template += %(\nRoute: `#{env.request.resource}`)
|
Date: `#{Time::Format::ISO_8601_DATE_TIME.format(Time.utc)}`
|
||||||
issue_template += %(\nVersion: `#{SOFTWARE["version"]} @ #{SOFTWARE["branch"]}`)
|
Route: `#{HTML.escape(env.request.resource)}`
|
||||||
# issue_template += github_details("Preferences", env.get("preferences").as(Preferences).to_pretty_json)
|
Version: `#{SOFTWARE["version"]} @ #{SOFTWARE["branch"]}`
|
||||||
issue_template += github_details("Backtrace", exception.inspect_with_backtrace)
|
|
||||||
|
TEXT
|
||||||
|
|
||||||
|
issue_template += github_details("Backtrace", HTML.escape(exception.inspect_with_backtrace))
|
||||||
|
|
||||||
# URLs for the error message below
|
# URLs for the error message below
|
||||||
url_faq = "https://github.com/iv-org/documentation/blob/master/FAQ.md"
|
url_faq = "https://github.com/iv-org/documentation/blob/master/FAQ.md"
|
||||||
|
Loading…
Reference in New Issue
Block a user