diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 6fdfdb5aa..6890c5b38 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, current_user == @user ? "Change your personal details" : "Change #{@user.name.presence || 'this user'}’s personal details" %> +<% content_for :title, current_user == @user ? "Change your personal details" : "Change #{sanitise_characters(@user.name.presence) || 'this user'}’s personal details" %> <% content_for :before_content do %> <%= govuk_back_link(href: :back) %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index df8c0e915..cfd21e270 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, current_user == @user ? "Your account" : "#{@user.name.presence || @user.email}’s account" %> +<% content_for :title, current_user == @user ? "Your account" : "#{sanitise_characters(@user.name.presence) || @user.email}’s account" %> <% if current_user.support? %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { diff --git a/app/views/users/toggle_active.html.erb b/app/views/users/toggle_active.html.erb index 40eaca551..00ae416c3 100644 --- a/app/views/users/toggle_active.html.erb +++ b/app/views/users/toggle_active.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "#{action.capitalize} #{@user.name.presence || @user.email}’s account" %> +<% content_for :title, "#{action.capitalize} #{sanitise_characters(@user.name.presence) || @user.email}’s account" %>
<%= form_for(@user, as: :user, html: { method: :patch }) do |f| %>