diff --git a/app/helpers/posts_helper.rb b/app/helpers/posts_helper.rb index d1e27edec..11fc0f60d 100644 --- a/app/helpers/posts_helper.rb +++ b/app/helpers/posts_helper.rb @@ -26,7 +26,7 @@ module PostsHelper text = "pixiv/#{$1}" source_link = link_to(text, post.normalized_source) source_search = "source:#{text}/" - elsif post.source =~ /^http/ + elsif post.source =~ %r{\Ahttps?://} text = truncate(post.normalized_source.sub(/^https?:\/\/(?:www\.)?/, "")) source_link = link_to(truncate(text, :length => 20), post.normalized_source) source_search = "source:#{post.source.sub(/[^\/]*$/, "")}" diff --git a/app/views/posts/index.atom.erb b/app/views/posts/index.atom.erb index 598bf1c9f..a0159ba17 100644 --- a/app/views/posts/index.atom.erb +++ b/app/views/posts/index.atom.erb @@ -14,7 +14,7 @@ <%= post.presenter.humanized_essential_tag_string %> - <% if post.source =~ /^http/ %> + <% if post.source =~ %r{\Ahttps?://} %> <% end %> http://<%= Danbooru.config.hostname %>/posts/<%= post.id %> diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index e22fa323e..fa0e39fe3 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -4,7 +4,7 @@ module Danbooru class Configuration # The version of this Danbooru. def version - "2.28.2" + "2.29.0" end # The name of this Danbooru.