diff --git a/app/models/post.rb b/app/models/post.rb index 62ad46ef9..804793a20 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -365,6 +365,11 @@ class Post < ActiveRecord::Base subdomain = $1 filename = $2 "http://#{subdomain}.wikia.com/wiki/File:#{filename}" + + when %r{\Ahttps?://vignette(?:\d*)\.wikia\.nocookie\.net/([^/]+)/images/[a-f0-9]/[a-f0-9]{2}/([^/]+)}i + subdomain = $1 + filename = $2 + "http://#{subdomain}.wikia.com/wiki/File:#{filename}" when %r{\Ahttp://(?:(?:\d{1,3}\.){3}\d{1,3}):(?:\d{1,5})/h/([a-f0-9]{40})-(?:\d+-){3}(?:png|gif|(?:jpe?g?))/keystamp=\d+-[a-f0-9]{10}/([^/]+)}i sha1hash = $1