mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #24929 from rosenfeld/patch-6
Improve AV changelog with regards to default RAW handler
This commit is contained in:
commit
f338bb5b50
1 changed files with 18 additions and 1 deletions
|
@ -292,7 +292,24 @@
|
|||
* Change the default template handler from `ERB` to `Raw`.
|
||||
|
||||
Files without a template handler in their extension will be rendered using the raw
|
||||
handler instead of ERB.
|
||||
handler instead of ERB. The raw handler does not flag the rendered text as html safe,
|
||||
so if your application rendered plain JS or HTML files before, you'll have to replace:
|
||||
|
||||
```erb
|
||||
<%= render '/common/analytics.js' %>
|
||||
```
|
||||
|
||||
with either
|
||||
|
||||
```erb
|
||||
<%= raw render '/common/analytics.js' %>
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```erb
|
||||
<%= render('/common/analytics.js').html_safe %>
|
||||
```
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
|
|
Loading…
Reference in a new issue