FIX: s3 cdn would break cooking if <img> tag had no src

This commit is contained in:
Sam Saffron
2015-06-10 18:56:44 +10:00
parent 677cdbbda0
commit b7a0a295c0
2 changed files with 4 additions and 2 deletions

View File

@ -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