mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Apply suggestions from code review
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8251ad5e99
commit
32c4cf5769
@@ -1,6 +1,6 @@
|
||||
class UsersController < ActionController::Base
|
||||
# BAD - create a user description, where the name is not escaped
|
||||
def create_user_description (name)
|
||||
"<h2>#{name}</h2>".html_safe
|
||||
"<b>#{name}</b>".html_safe
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class UsersController < ActionController::Base
|
||||
# Good - create a user description, where the name is escaped
|
||||
def create_user_description (name)
|
||||
"<h2>#{ERB::Util.html_escape(name)}</h2>".html_safe
|
||||
"<b>#{ERB::Util.html_escape(name)}</b>".html_safe
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user