diff --git a/app/views/notifications/_milestone.html.erb b/app/views/notifications/_milestone.html.erb
index 8660e2ac8..f8d339f00 100644
--- a/app/views/notifications/_milestone.html.erb
+++ b/app/views/notifications/_milestone.html.erb
@@ -2,7 +2,7 @@
🎉🎉🎉🎉🎉🎉🎉🎉
diff --git a/app/views/notifications/_tagadjustment.html.erb b/app/views/notifications/_tagadjustment.html.erb
index 0a42957fd..bd6b924ad 100644
--- a/app/views/notifications/_tagadjustment.html.erb
+++ b/app/views/notifications/_tagadjustment.html.erb
@@ -8,7 +8,7 @@
Moderators removed the
" style="font-weight: 900">#<%= data["tag_name"] %> tag from your post
-
"><%= data["article"]["title"] %>.
+
"><%= h(data["article"]["title"]) %>.
Certain tags have special submission guidelines, and mods need to adjust tags to best fit the community.
diff --git a/spec/requests/notifications_spec.rb b/spec/requests/notifications_spec.rb
index f18f8e10e..c951a4291 100644
--- a/spec/requests/notifications_spec.rb
+++ b/spec/requests/notifications_spec.rb
@@ -131,14 +131,14 @@ RSpec.describe "NotificationsIndex", type: :request do
it "properly renders reactable titles" do
mock_heart_reaction_notifications(1, %w[unicorn like readinglist], special_characters_article)
get "/notifications"
- expect(response.body).to include special_characters_article.title
+ expect(response.body).to include ERB::Util.html_escape(special_characters_article.title)
end
it "properly renders reactable titles for multiple reactions" do
amount = rand(3..10)
mock_heart_reaction_notifications(amount, %w[unicorn like readinglist], special_characters_article)
get "/notifications"
- expect(response.body).to include special_characters_article.title
+ expect(response.body).to include ERB::Util.html_escape(special_characters_article.title)
end
end