fix for #1217
This commit is contained in:
@@ -21,11 +21,11 @@ module PostsHelper
|
||||
if post.source =~ %r!http://img\d+\.pixiv\.net/img/([^\/]+)/!
|
||||
text = "pixiv/#{$1}"
|
||||
source_link = link_to(text, post.normalized_source)
|
||||
source_search = "source:#{text}"
|
||||
source_search = "source:#{text}/"
|
||||
elsif post.source =~ %r!http://i\d\.pixiv\.net/img\d+/img/([^\/]+)/!
|
||||
text = "pixiv/#{$1}"
|
||||
source_link = link_to(text, post.normalized_source)
|
||||
source_search = "source:#{text}"
|
||||
source_search = "source:#{text}/"
|
||||
elsif post.source =~ /^http/
|
||||
text = truncate(post.normalized_source.sub(/^https?:\/\/(?:www\.)?/, ""))
|
||||
source_link = link_to(truncate(text, :length => 20), post.normalized_source)
|
||||
|
||||
Reference in New Issue
Block a user