mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:01:26 +08:00
FIX: handle quote rendering for external Discourse instance (#16722)
Gracefully handle quotes from an external discourse instance by stripping quote-controls and including username in the title
This commit is contained in:
@ -1753,6 +1753,22 @@ describe CookedPostProcessor do
|
||||
end
|
||||
end
|
||||
|
||||
context "external discourse instance quote" do
|
||||
let(:external_raw) do
|
||||
<<~RAW.strip
|
||||
[quote="random_guy_not_from_our_discourse, post:2004, topic:401"]
|
||||
this quote is not from our discourse
|
||||
[/quote]
|
||||
and this is a reply
|
||||
RAW
|
||||
end
|
||||
let(:cp) { Fabricate(:post, raw: external_raw) }
|
||||
|
||||
it "it should be marked as missing" do
|
||||
cpp.post_process_quotes
|
||||
expect(cpp.doc.css('aside.quote.quote-post-not-found')).to be_present
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "full quote on direct reply" do
|
||||
|
Reference in New Issue
Block a user