Use helpers.tag and safe_join instead of html_safe (#11916)
This commit is contained in:
parent
f6278a9106
commit
1ae0b4f47a
1 changed files with 3 additions and 5 deletions
|
|
@ -76,14 +76,12 @@ module Admin
|
|||
@user = User.find(params[:id])
|
||||
begin
|
||||
Moderator::DeleteUser.call(user: @user)
|
||||
link = helpers.link_to("the page", admin_users_gdpr_delete_requests_path, "data-no-instant" => true)
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
link = helpers.tag.a("the page", href: admin_users_gdpr_delete_requests_path, data: { "no-instant" => true })
|
||||
message = "@#{@user.username} (email: #{@user.email.presence || 'no email'}, user_id: #{@user.id}) " \
|
||||
"has been fully deleted. " \
|
||||
"If this is a GDPR delete, delete them from Mailchimp & Google Analytics " \
|
||||
" and confirm on #{link}.".html_safe
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
flash[:success] = message
|
||||
" and confirm on "
|
||||
flash[:success] = helpers.safe_join([message, link, "."])
|
||||
rescue StandardError => e
|
||||
flash[:danger] = e.message
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue