FIX: Don't raise an error when the img attribute cannot be found

This commit is contained in:
Robin Ward
2017-05-08 15:35:31 -04:00
parent afe04b8bbb
commit 009e120e13
2 changed files with 9 additions and 0 deletions

View File

@ -158,6 +158,9 @@ class CookedPostProcessor
absolute_url = url
absolute_url = Discourse.base_url_no_prefix + absolute_url if absolute_url =~ /^\/[^\/]/
return unless absolute_url
# FastImage fails when there's no scheme
absolute_url = SiteSetting.scheme + ":" + absolute_url if absolute_url.start_with?("//")