tabs->spaces

This commit is contained in:
Toks
2015-05-08 13:49:53 -04:00
parent 6faa6305dd
commit 9b1a0447ac

View File

@@ -431,14 +431,19 @@ class Post < ActiveRecord::Base
"http://nijie.info/view.php?id=#{$1}"
when %r{\Ahttps?://(?:o|image-proxy-origin)\.twimg\.com/\d/proxy\.jpg\?t=(\w+)&}i
str = Base64.decode64($1)
url = URI.extract(str, ['http', 'https'])
if (url[0] =~ /^https?:\/\/twitpic.com\/show\/large\/[a-z0-9]+/i)
url[0].gsub!(/show\/large\//, "")
index = url[0].rindex('.')
url[0] = url[0][0..index-1]
end
"#{url[0]}"
str = Base64.decode64($1)
url = URI.extract(str, ['http', 'https'])
if url.any?
url = url[0]
if (url =~ /^https?:\/\/twitpic.com\/show\/large\/[a-z0-9]+/i)
url.gsub!(/show\/large\//, "")
index = url.rindex('.')
url = url[0..index-1]
end
url
else
source
end
else
source