This commit is contained in:
Toks
2013-08-21 13:53:15 -04:00
3 changed files with 3 additions and 3 deletions

View File

@@ -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(/[^\/]*$/, "")}"

View File

@@ -14,7 +14,7 @@
<entry>
<title><%= post.presenter.humanized_essential_tag_string %></title>
<link href="http://<%= Danbooru.config.hostname %>/posts/<%= post.id %>" rel="alternate"/>
<% if post.source =~ /^http/ %>
<% if post.source =~ %r{\Ahttps?://} %>
<link href="<%= post.source %>" rel="related"/>
<% end %>
<id>http://<%= Danbooru.config.hostname %>/posts/<%= post.id %></id>

View File

@@ -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.