InterviewSolution
Saved Bookmarks
| 1. |
How Do I Automatically Escape Html? |
|
Answer» REQUIRE Erubis and SET escape_html to TRUE: require 'erubis' set :erb, :escape_html => true Then, any TEMPLATES RENDERED with Erubis will be automatically escaped: get '/' do erb :index end Require Erubis and set escape_html to true: require 'erubis' set :erb, :escape_html => true Then, any templates rendered with Erubis will be automatically escaped: get '/' do erb :index end |
|