mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
FIX: Allow sanitized-HTML in GH issues and categories oneboxes. (#25374)
Follow-up to d78357917c
Related meta topic: https://meta.discourse.org/t/html-is-not-render-on-category-onebox-description/289424:
This commit is contained in:
@ -40,7 +40,10 @@ module Onebox
|
||||
body, excerpt = compute_body(raw["body"])
|
||||
ulink = URI(link)
|
||||
|
||||
labels = raw["labels"].map { |l| { name: Emoji.codes_to_img(CGI.escapeHTML(l["name"])) } }
|
||||
labels =
|
||||
raw["labels"].map do |l|
|
||||
{ name: Emoji.codes_to_img(Onebox::Helpers.sanitize(l["name"])) }
|
||||
end
|
||||
|
||||
{
|
||||
link: @url,
|
||||
|
Reference in New Issue
Block a user