# Rail2 and Rails3 beta3 process \<%= '\<h1\>hello\</h1\>' %\> differently

**URL:** <https://www.ruby-forum.com/t/rail2-and-rails3-beta3-process-h1-hello-h1-differently/188233>\
**Category:** Rails\
**Created:** [May 8, 2010, 4:38am UTC](https://www.ruby-forum.com/t/rail2-and-rails3-beta3-process-h1-hello-h1-differently/188233 "2010-05-08T04:38:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 8, 2010, 4:38am UTC](https://www.ruby-forum.com/t/rail2-and-rails3-beta3-process-h1-hello-h1-differently/188233/1 "2010-05-08T04:38:57Z")

</div>

Rail2 and Rails3 beta3 process \<%= ‘

# hello
’ %\> differently.

Rails3 must use \<%= capture {‘

# hello
’} %\> to get the same  
result as Rails2

Is this intentional or is it a bug?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 8, 2010, 10:13am UTC](https://www.ruby-forum.com/t/rail2-and-rails3-beta3-process-h1-hello-h1-differently/188233/2 "2010-05-08T10:13:44Z")

</div>

Rails 3 escapes content by default now.

See [RailsDispatch.com is for sale | HugeDomains](http://www.railsdispatch.com/posts/security) for more details.

So, now you have to use either:

\<%=raw ‘

# hello
’ %\>

Or:

\<%= ‘

# hello
’.html\_safe %\>

Regards  
Kieran

On May 8, 2:37 pm, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
