fixes #80: Clicking Pixiv source address at the information panel

This commit is contained in:
albert
2011-09-16 10:58:02 -04:00
parent 5ee7bcd51b
commit fbc1fb1f51
2 changed files with 16 additions and 2 deletions

View File

@@ -23,8 +23,8 @@ module PostsHelper
def post_source_tag(post)
if post.source =~ /^http/
text = truncate(post.source.sub(/^https?:\/\//, ""))
link_to(truncate(text, :length => 15), post.source)
text = truncate(post.normalized_source.sub(/^https?:\/\//, ""))
link_to(truncate(text, :length => 15), post.normalized_source)
else
truncate(post.source, :length => 100)
end