Skip to content

Commit e05764f

Browse files
authored
Merge pull request rails#46420 from wakairo/small_guides_fix
Change from escapeHTML() to html_escape()
2 parents 4d102eb + 782b26b commit e05764f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ s = sanitize(user_input, tags: tags, attributes: %w(href title))
788788

789789
This allows only the given tags and does a good job, even against all kinds of tricks and malformed tags.
790790

791-
As a second step, _it is good practice to escape all output of the application_, especially when re-displaying user input, which hasn't been input-filtered (as in the search form example earlier on). _Use `escapeHTML()` (or its alias `h()`) method_ to replace the HTML input characters `&`, `"`, `<`, and `>` by their uninterpreted representations in HTML (`&amp;`, `&quot;`, `&lt;`, and `&gt;`).
791+
As a second step, _it is good practice to escape all output of the application_, especially when re-displaying user input, which hasn't been input-filtered (as in the search form example earlier on). _Use `html_escape()` (or its alias `h()`) method_ to replace the HTML input characters `&`, `"`, `<`, and `>` by their uninterpreted representations in HTML (`&amp;`, `&quot;`, `&lt;`, and `&gt;`).
792792

793793
##### Obfuscation and Encoding Injection
794794

0 commit comments

Comments
 (0)