mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
HTML escape error message
This commit is contained in:
parent
53d349a648
commit
76cc8ac66b
1 changed files with 9 additions and 6 deletions
|
@ -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 a new issue