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

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

Rails3 must use <%= capture {'<h1>hello</h1>'} %> to get the same result as Rails2

Is this intentional or is it a bug?

Rails 3 escapes content by default now.

See RailsDispatch.com is for sale | HugeDomains for more details.

So, now you have to use either:

<%=raw '<h1>hello</h1>' %>

Or:

<%= '<h1>hello</h1>'.html_safe %>

Regards Kieran