change seo tag boundary to __

This commit is contained in:
r888888888
2016-06-21 13:24:26 -07:00
parent 2ce86ecb8b
commit 681fc62f06

View File

@@ -113,14 +113,14 @@ class Post < ActiveRecord::Base
def seo_tag_string def seo_tag_string
if Danbooru.config.enable_seo_post_urls && !CurrentUser.user.disable_tagged_filenames? if Danbooru.config.enable_seo_post_urls && !CurrentUser.user.disable_tagged_filenames?
"--#{seo_tags}--" "__#{seo_tags}__"
else else
nil nil
end end
end end
def seo_tags def seo_tags
@seo_tags ||= humanized_essential_tag_string.gsub(/[^a-z0-9]+/, "-").gsub(/(?:^-+)|(?:-+$)/, "").gsub(/-{2,}/, "-") @seo_tags ||= humanized_essential_tag_string.gsub(/[^a-z0-9]+/, "_").gsub(/(?:^_+)|(?:_+$)/, "").gsub(/_{2,}/, "_")
end end
def preview_file_url def preview_file_url