Skip to content

Commit

Permalink
fix: escape username on avatar control (#23713) (#23716)
Browse files Browse the repository at this point in the history
[skip ci]

(cherry picked from commit 81b7537)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Dec 11, 2023
1 parent 132ac1d commit 980dae7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frappe/templates/includes/avatar_macro.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% macro avatar(user_id=None, css_style=None, size="avatar-small", full_name=None, image=None) %}
{% set user_info = frappe.utils.get_user_info_for_avatar(user_id) %}
<span class="avatar {{ size }}" title="{{ full_name or user_info.name }}" style="{{ css_style or '' }}">
<span class="avatar {{ size }}" title="{{ full_name|e or user_info.name|e }}" style="{{ css_style or '' }}">
{% if image or user_info.image %}
<img
class="avatar-frame standard-image"
src="{{ image or user_info.image }}"
title="{{ full_name or user_info.name }}">
title="{{ full_name|e or user_info.name|e }}">
{% else %}
<span
class="avatar-frame standard-image"
title="{{ full_name or user_info.name }}">
title="{{ full_name|e or user_info.name|e }}">
{{ frappe.utils.get_abbr(full_name or user_info.name).upper() }}
</span>
{% endif %}
Expand Down

0 comments on commit 980dae7

Please sign in to comment.