update #1866 escape

escape the dot in the url
This commit is contained in:
ghostrigger
2014-06-15 23:16:49 +08:00
parent c48f03a926
commit 964be9a633

View File

@@ -312,16 +312,16 @@ class Post < ActiveRecord::Base
day = $5
"http://diary#{server_id}.fc2.com/cgi-sys/ed.cgi/#{username}?Y=#{year}&M=#{month}&D=#{day}"
when %r{\Ahttps?://s(?:content|photos)-[^/]+\.fbcdn.net/hphotos-.+/\d+_(\d+)_\d+_[no]\.}i
when %r{\Ahttps?://s(?:content|photos)-[^/]+\.fbcdn\.net/hphotos-.+/\d+_(\d+)_\d+_[no]\.}i
"https://www.facebook.com/photo.php?fbid=#{$1}"
when %r{\Ahttp://c(?:s|han|[1-4]).sankakucomplex.com/data(?:/sample)?/(?:[a-f0-9]{2}/){2}(?:sample-|preview)?([a-f0-9]{32})}i
when %r{\Ahttp://c(?:s|han|[1-4])\.sankakucomplex\.com/data(?:/sample)?/(?:[a-f0-9]{2}/){2}(?:sample-|preview)?([a-f0-9]{32})}i
"http://chan.sankakucomplex.com/en/post/show?md5=#{$1}"
when %r{\Ahttp?://s(?:tatic|[1-4]).zerochan.net/.+(?:\.|\/)(\d+)\.(?:jpe?g?)\z}i
when %r{\Ahttp://s(?:tatic|[1-4])\.zerochan\.net/.+(?:\.|\/)(\d+)\.(?:jpe?g?)\z}i
"http://www.zerochan.net/#{$1}#full"
when %r{\Ahttp?://static[1-6]?.minitokyo.net/(?:downloads|view)/(?:\d{2}/){2}(\d+)}i
when %r{\Ahttp://static[1-6]?\.minitokyo\.net/(?:downloads|view)/(?:\d{2}/){2}(\d+)}i
"http://gallery.minitokyo.net/download/#{$1}"
else