mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: Maintain HTML <img
when downloading remote images (#16278)
Under some conditions, replacing an `<img` with `![]()` can break rendering, and make the image disappear. Context at https://meta.discourse.org/t/152801
This commit is contained in:
@ -614,7 +614,7 @@ describe Email::Receiver do
|
||||
expect(post.raw).to eq(<<~MD.chomp)
|
||||
**Before**
|
||||
|
||||

|
||||
<img src="#{upload.short_url}" alt="内嵌图片 1">
|
||||
|
||||
*After*
|
||||
MD
|
||||
@ -648,7 +648,7 @@ describe Email::Receiver do
|
||||
<details class='elided'>
|
||||
<summary title='Show trimmed content'>···</summary>
|
||||
|
||||

|
||||
<img src="upload://qUm0DGR49PAZshIi7HxMd3cAlzn.png" width="300" height="200">
|
||||
|
||||
</details>
|
||||
MD
|
||||
@ -673,7 +673,7 @@ describe Email::Receiver do
|
||||
expect(post.raw).to eq(<<~MD.chomp)
|
||||
Picture below.
|
||||
|
||||

|
||||
<img apple-inline="yes" id="06C04C58-783E-4753-9B6B-D57403903060" src="#{upload.short_url}" class="">
|
||||
|
||||
Picture above.
|
||||
MD
|
||||
|
Reference in New Issue
Block a user