Skip to content

Commit

Permalink
Fix method name at escape html FAQ block
Browse files Browse the repository at this point in the history
Rack::Utils#escape exists, but it is the method for URI escape.
The method for HTML escape is Rack::Utils#escape_html.
In refered page escape_html is also used,
please see http://www.gittr.com/index.php/archive/using-rackutils-in-sinatra-escape_html-h-in-rails/
  • Loading branch information
bigwheel committed Jul 14, 2012
1 parent e02e3d0 commit 5c4e9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faq.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ in your helpers and create an `h` alias as follows:

helpers do
include Rack::Utils
alias_method :h, :escape
alias_method :h, :escape_html
end

Now you can escape html in your templates like this:
Expand Down

0 comments on commit 5c4e9be

Please sign in to comment.