diff --git a/app/views/projects/project_members/_groups.html.haml b/app/views/projects/project_members/_groups.html.haml
index b5d397e3065..00321014f91 100644
--- a/app/views/projects/project_members/_groups.html.haml
+++ b/app/views/projects/project_members/_groups.html.haml
@@ -1,6 +1,6 @@
.card.project-members-groups
.card-header
- = _("Groups with access to %{project_name}").html_safe % { project_name: sanitize_project_name(@project.name) }
+ = _("Groups with access to %{project_name}").html_safe % { project_name: sanitize(@project.name, tags: []) }
%span.badge.badge-pill= group_links.size
%ul.content-list.members-list
= render partial: 'shared/members/group', collection: group_links, as: :group_link
diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml
index e0dd386fc5d..f220299ec30 100644
--- a/app/views/projects/project_members/_team.html.haml
+++ b/app/views/projects/project_members/_team.html.haml
@@ -4,7 +4,7 @@
.card
.card-header.flex-project-members-panel
%span.flex-project-title
- = _("Members of %{project_name}").html_safe % { project_name: sanitize_project_name(project.name) }
+ = _("Members of %{project_name}").html_safe % { project_name: sanitize(project.name, tags: []) }
%span.badge.badge-pill= members.total_count
= form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group
diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml
index 242ff91f539..8373903443e 100644
--- a/app/views/projects/project_members/index.html.haml
+++ b/app/views/projects/project_members/index.html.haml
@@ -6,7 +6,7 @@
= _("Project members")
- if can?(current_user, :admin_project_member, @project)
%p
- = _("You can invite a new member to %{project_name} or invite another group.").html_safe % { project_name: sanitize_project_name(@project.name) }
+ = _("You can invite a new member to %{project_name} or invite another group.").html_safe % { project_name: sanitize(@project.name, tags: []) }
- else
%p
= _("Members can be added by project Maintainers or Owners").html_safe
diff --git a/changelogs/unreleased/58751-fix-project-name-members-page.yml b/changelogs/unreleased/58751-fix-project-name-members-page.yml
new file mode 100644
index 00000000000..a295afc5c48
--- /dev/null
+++ b/changelogs/unreleased/58751-fix-project-name-members-page.yml
@@ -0,0 +1,5 @@
+---
+title: "Fix unwanted character replacement on project members page caused by usage of sanitize function"
+merge_request: 25946
+author: Elias Werberich
+type: fixed