Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(accounts): sanitize activity entry names for highlighting

bugbug1111186d92508cb3e
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb
index 90966cec9f..302902f392 100644
--- a/app/helpers/accounts_helper.rb
+++ b/app/helpers/accounts_helper.rb
@@ -15,6 +15,7 @@ module AccountsHelper
search = query.to_s.strip
return name if search.blank?
- highlight(name, search, highlighter: ACTIVITY_HIGHLIGHT_MARKUP)
+ escaped_name = ERB::Util.html_escape(name.to_s)
+ highlight(escaped_name, search, highlighter: ACTIVITY_HIGHLIGHT_MARKUP, sanitize: false)
end
end