FIX: Respect protocol relative URLs in email styling

This commit is contained in:
Robin Ward
2013-08-14 11:32:17 -04:00
parent 7cfb583016
commit b7c50ecdaa
2 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@ module Email
img['style'] = "max-width: 694px;"
end
if img['src'][0] == "/"
if img['src'] =~ /^\/[^\/]/
img['src'] = "#{Discourse.base_url}#{img['src']}"
end
end