Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Corrected FAQ answer regarding escaping HTML #76

Closed
wants to merge 1 commit into from

2 participants

@tedsparc

Hello,

I found a small documentation bug in the Sinatra FAQ. The question "How do I escape html?" has a good answer, but the escape method does URL encoding, whereas escape_html is what's being called for here.

@tedb tedb Corrected FAQ answer regarding escaping HTML. The escape method does …
…URL encoding, whereas escape_html is what's being called for here.
f45c48a
@tedsparc tedsparc closed this
@tedsparc

Inadvertently duplicated pull request 73.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 2, 2012
  1. @tedb

    Corrected FAQ answer regarding escaping HTML. The escape method does …

    tedb authored
    …URL encoding, whereas escape_html is what's being called for here.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  faq.markdown
View
2  faq.markdown
@@ -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:
Something went wrong with that request. Please try again.