title: Decoding HTML twice in rails
body: <p>I'm pulling data from a XML file which comes out as doubly encoded HTML which I am able to decode into straight HTML using <code>raw</code>, <code>h</code>, or <code>String.html_safe</code>. Doubling up any of these methods doesn't seem to decode further so when I print the string in the view, it renders as encoded HTML.</p>
  
  <p>For example, I might get the string:</p>
  
  <pre><code>@paragraph = &amp;amp;lt;p&amp;amp;gt;This is a Paragraph.&amp;amp;lt;/p&amp;amp;gt;
  </code></pre>
  
  <p>When I print <code>&lt;%= @paragraph %&gt;</code> I get <code>&amp;lt;p&amp;gt;This is a Paragraph.&amp;lt;/p&amp;gt;</code> showing in my browser. Printing <code>&lt;%= raw @paragraph %&gt;</code> renders <code>&lt;p&gt;This is a Paragraph.&lt;/p&gt;</code>.</p>
  
  <p>So far as expected. But now when I try to decode again: <code>&lt;%= raw (raw @paragraph) %&gt;</code> I get <code>&lt;p&gt;This is a Paragraph.&lt;/p&gt;</code>. No matter how many times I call <code>raw</code> or any of the other two methods, I continue to get encoded HTML.</p>
  
  <p>What I'm looking for is of course:</p>
  
  <p>
  This is a paragraph.
  </p>