mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Describe how to escape html in sinatra
This commit is contained in:
parent
df5dd9f2e9
commit
3a99cc2580
1 changed files with 15 additions and 0 deletions
15
README.md
15
README.md
|
@ -49,6 +49,21 @@ Hamlit is used on [githubranking.com](http://githubranking.com/).
|
|||
Basically the same as [haml](https://github.com/haml/haml).
|
||||
Check out the [reference documentation](http://haml.info/docs/yardoc/file.REFERENCE.html) for details.
|
||||
|
||||
### Rails
|
||||
|
||||
Just update Gemfile.
|
||||
|
||||
### Sinatra
|
||||
|
||||
For compatibility with Haml, Hamlit does not escape html automatically in sinatra.
|
||||
You can enable html escaping manually:
|
||||
|
||||
```ruby
|
||||
configure do
|
||||
Hamlit::Engine.set_default_options(escape_html: true)
|
||||
end
|
||||
```
|
||||
|
||||
## Why high performance?
|
||||
### Less work on runtime
|
||||
Haml's rendering is very slow because generated code by haml runs many operations on runtime.
|
||||
|
|
Loading…
Add table
Reference in a new issue