dtext: don't link non-artist tags to artist entries.
* Don't link non-artist tags to artist pages, even when the tag has an
artist entry. These artist entries are usually old deleted entries
that happen to have the same name as a gentag, or leftover entries
that need to be deleted.
* URL escape the artist name in /artists/show_or_new?name={name}
This commit is contained in:
@@ -37,8 +37,8 @@ class DText
|
||||
tag = tags.find { |tag| tag.name == name }
|
||||
artist = artists.find { |artist| artist.name == name }
|
||||
|
||||
if (tag.present? && tag.category == Tag.categories.artist) || artist.present?
|
||||
node["href"] = "/artists/show_or_new?name=#{name}"
|
||||
if tag.present? && tag.category == Tag.categories.artist
|
||||
node["href"] = "/artists/show_or_new?name=#{CGI.escape(name)}"
|
||||
|
||||
if artist.blank?
|
||||
node["class"] += " dtext-artist-does-not-exist"
|
||||
|
||||
Reference in New Issue
Block a user