Merge pull request #367 from alyaeanyx/no-href-to-deleted-user

Don't create hrefs to u/[deleted]
This commit is contained in:
Spike 2021-12-19 16:58:04 -08:00 committed by GitHub
commit 4c8b724a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,11 @@
</div> </div>
<details class="comment_right" {% if !collapsed || highlighted %}open{% endif %}> <details class="comment_right" {% if !collapsed || highlighted %}open{% endif %}>
<summary class="comment_data"> <summary class="comment_data">
<a class="comment_author {{ author.distinguished }} {% if author.name == post_author %}op{% endif %}" href="/user/{{ author.name }}">u/{{ author.name }}</a> {% if author.name != "[deleted]" %}
<a class="comment_author {{ author.distinguished }} {% if author.name == post_author %}op{% endif %}" href="/user/{{ author.name }}">u/{{ author.name }}</a>
{% else %}
u/{{ author.name }}
{% endif %}
{% if author.flair.flair_parts.len() > 0 %} {% if author.flair.flair_parts.len() > 0 %}
<small class="author_flair">{% call utils::render_flair(author.flair.flair_parts) %}</small> <small class="author_flair">{% call utils::render_flair(author.flair.flair_parts) %}</small>
{% endif %} {% endif %}