Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix method name at escape html FAQ block #73

Merged
merged 1 commit into from over 1 year ago

2 participants

k.bigwheel Konstantin Haase
k.bigwheel

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/

k.bigwheel Fix method name at escape html FAQ block
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/
5c4e9be
Konstantin Haase rkh merged commit bec4d4d into from August 02, 2012
Konstantin Haase rkh closed this August 02, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 15, 2012
k.bigwheel Fix method name at escape html FAQ block
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/
5c4e9be
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  faq.markdown
2  faq.markdown
Source Rendered
@@ -235,7 +235,7 @@ in your helpers and create an `h` alias as follows:
235 235
 
236 236
     helpers do
237 237
       include Rack::Utils
238  
-      alias_method :h, :escape
  238
+      alias_method :h, :escape_html
239 239
     end
240 240
 
241 241
 Now you can escape html in your templates like this:
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.