mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
FIX: Quotes should be ignored when parsing for onebox source.
This commit is contained in:
parent
0a4c30bce3
commit
3861bd2793
2 changed files with 20 additions and 8 deletions
|
@ -85,7 +85,11 @@ class ExcerptParser < Nokogiri::XML::SAX::Document
|
|||
end
|
||||
|
||||
when "aside"
|
||||
@in_quote = true unless @keep_onebox_source
|
||||
attributes = Hash[*attributes.flatten]
|
||||
|
||||
unless @keep_onebox_source && attributes['class'].include?('onebox')
|
||||
@in_quote = true
|
||||
end
|
||||
when 'article'
|
||||
if @keep_onebox_source && attributes.include?(['class', 'onebox-body'])
|
||||
@in_quote = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue