mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: discobot certificate description wasn't escaped
This commit is contained in:
parent
62edf3c401
commit
0187423c68
@ -119,10 +119,12 @@ module DiscourseNarrativeBot
|
||||
date: Time.zone.now.strftime('%b %d %Y'),
|
||||
format: :svg
|
||||
}
|
||||
|
||||
options.merge!(type: type) if type
|
||||
|
||||
src = Discourse.base_url + DiscourseNarrativeBot::Engine.routes.url_helpers.certificate_path(options)
|
||||
"<img class='discobot-certificate' src='#{src}' width='650' height='464' alt='#{I18n.t("#{self.class::I18N_KEY}.certificate.alt")}'>"
|
||||
alt = CGI.escapeHTML(I18n.t("#{self.class::I18N_KEY}.certificate.alt"))
|
||||
|
||||
"<img class='discobot-certificate' src='#{src}' width='650' height='464' alt='#{alt}'>"
|
||||
end
|
||||
|
||||
protected
|
||||
|
Loading…
x
Reference in New Issue
Block a user