Skip to content

Commit 346c5e0

Browse files
Antonin Steinhausersteveyken
authored andcommitted
Context-sensitive XSS bugfix.
1 parent 27f9055 commit 346c5e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/tags_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def tags_for_index(model)
1515
elsif !query.include?(hashtag)
1616
query += " #{hashtag}"
1717
end
18-
out << link_to_function(tag, "crm.search_tagged('#{query}', '#{model.class.to_s.tableize}')", title: tag)
18+
out << link_to_function(tag, "crm.search_tagged('#{escape_javascript(query)}', '#{model.class.to_s.tableize}')", title: tag)
1919
end
2020
end
2121

0 commit comments

Comments
 (0)