Skip to content

Commit

Permalink
Review hypertext: Use placeholder element for icons
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Oct 8, 2024
1 parent 69904db commit f621cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils/minetest_hypertext.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ def make_link(url: str, label: str):
content = html_to_minetest(html, package.get_url("packages.view", absolute=True),
formspec_version, False, f"review_{review.id}_")["body"].strip()
author = make_link(abs_url_for("users.profile", username=review.author.username), review.author.display_name)
rating = ["👎", "👎", "-", "👍", "👍"][review.rating - 1]
rating = ["<thumbsup>", "<thumbsup>", "<neutral>", "<thumbsup>", "<thumbsup>"][review.rating - 1]
comments = make_link(abs_url_for("threads.view", id=review.thread.id), "Comments")
body += f"{author} {review.rating}\n<big>{escape_hypertext(review.thread.title)}</big>\n{content}\n{comments}\n\n"
body += f"{author} {rating}\n<big>{escape_hypertext(review.thread.title)}</big>\n{content}\n{comments}\n\n"

return {
"head": HEAD,
Expand Down

0 comments on commit f621cd1

Please sign in to comment.