mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: s3 cdn would break cooking if <img> tag had no src
This commit is contained in:
@ -224,6 +224,7 @@ module PrettyText
|
||||
|
||||
def self.add_s3_cdn(doc)
|
||||
doc.css("img").each do |img|
|
||||
next unless img["src"]
|
||||
img["src"] = img["src"].sub(Discourse.store.absolute_base_url, SiteSetting.s3_cdn_url)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user