From 96d5a937d51c4247a860a09c0e1b13ce70ac1dea Mon Sep 17 00:00:00 2001 From: Toks Date: Fri, 14 Mar 2014 11:35:26 -0400 Subject: [PATCH] fixes #2106 --- app/helpers/posts_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/posts_helper.rb b/app/helpers/posts_helper.rb index a37e8de32..bdfcfe803 100644 --- a/app/helpers/posts_helper.rb +++ b/app/helpers/posts_helper.rb @@ -21,11 +21,11 @@ module PostsHelper if post.source =~ %r!http://img\d+\.pixiv\.net/img/([^\/]+)/! text = "pixiv/#{wordbreakify($1)}".html_safe source_link = link_to(text, post.normalized_source) - source_search = "source:#{text}/" + source_search = "source:pixiv/#{$1}/" elsif post.source =~ %r!http://i\d\.pixiv\.net/img\d+/img/([^\/]+)/! text = "pixiv/#{wordbreakify($1)}".html_safe source_link = link_to(text, post.normalized_source) - source_search = "source:#{text}/" + source_search = "source:pixiv/#{$1}/" elsif post.source =~ %r{\Ahttps?://} text = truncate(post.normalized_source.sub(/^https?:\/\/(?:www\.)?/, "")) source_link = link_to(truncate(text, :length => 20), post.normalized_source)