mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 13:07:54 +08:00
FIX: escape youtube title when constructing onebox preview html (#16999)
This commit is contained in:
@ -42,7 +42,7 @@ module Onebox
|
||||
result = parse_embed_response
|
||||
result ||= get_opengraph.data
|
||||
|
||||
"<img src='#{result[:image]}' width='#{WIDTH}' height='#{HEIGHT}' title='#{result[:title]}'>"
|
||||
"<img src='#{result[:image]}' width='#{WIDTH}' height='#{HEIGHT}' title='#{CGI::escapeHTML(result[:title])}'>"
|
||||
else
|
||||
to_html
|
||||
end
|
||||
|
Reference in New Issue
Block a user