I'm upgrading my CMS app to rails 3, but some parts just don't get unescaped :-(:
From application.html.erb:
<% for article in topplinker %> <% nr = nr + 1 -%> <%= text2html(article.ingress, article.cloth).html_safe %> # <----- Here it is! <% if defined?(session[:noruser]) -%> <%if authorized_to?(:controller => 'articles', :action => 'edit') linkon = 1 %> <span class="editmeny"> <%= link_to "Edit", :controller => 'articles', :action => 'edit', :id => article.id %> </span> <% end %> <% end -%>
returns the following unescaped text:
<div class="toppmenylinje1"> <h2 class="skjultstruktur">Hovedmeny</h2> <ul> <li class="first" id="tm1"><a href="/">Forside</a></li> <li id="tm2"><a href="/nyheter">Nyheter</a></li> <li id="tm3"><a href="/ organisasjon">Organisasjon</a></li> <li id="tm4"><a href="/ ressurser">Ressurser</a></li> </ul> </div> <div class="toppmenylinje2"> <h2 class="skjultstruktur">Meny for sentralt</ h2> <ul> <li class="first"><a href="/sentralt/view/13305">Hva er rasisme?</a></li> <li><a href="/blimedlem">Bli medlem!</a></li> <li><a href="/Sentralt/60">Meninger</a></li> <li><a href="/ materiell">Materiell</a></li> <li><a href="/account/login" title="Logg inn på nettsiden">Logg inn</a></li> <li><a href="/ epost">E-post</a></li> <li><a href="Index of /start/view 12098">Kontakt oss</a></li> </ul> </div>
What do I do wrong?