Rails 2.3.7 and content_for problem

I want to offer control over my app's navigation using multiple
yields, which worked fine on my home rails 3 installation, but at
work, I'm stuck with an app that uses 2.7, and the same approach isn't

Basically, I have 3 yields: <% yield :navigation%> <% yield :sidebar
%> and regular ol' yield.

The regular one works fine, of course. However, the other two result
in certain tags being escaped: <ul>, <li>, <nav>, etc. The result is
that the tags appear as text in the display, and aren't interpreted by
the browser. I've tried the few suggestions I've found on the internet
(prefix the content_for with raw, etc), however, nothing has changed
the outcome. I should say that link_to in the content_for block is
properly handled and is not escaped, which is pretty interesting to

I've reproduced the problem to a newly generated app with 1 scaffold
based class, with only minor alterations (adding the application.erb
and modifications to the index.html.erb file. Note that the navigation
content_for shows the list markup as text, but obeys the output of
link_to as markup.

<!DOCTYPE html>

   <section id="page">
      <nav><%= raw yield :navigation %></nav>

     <%= yield %>


<% content_for :navigation do %>
  <ul><li><%= link_to 'New page', new_page_path %></li></ul>
<% end %>

<h1>Listing pages</h1>


<% @pages.each do |page| %>
    <td><%=h page.title %></td>
    <td><%=h page.body %></td>
    <td><%= link_to 'Show', page %></td>
    <td><%= link_to 'Edit', edit_page_path(page) %></td>
    <td><%= link_to 'Destroy', page, :confirm => 'Are you
sure?', :method => :delete %></td>
<% end %>

<br />