title: How Can I Convert \r \n to <p> with simple format in Ruby on Rails?
body: <p>Right now it just adds </p>
  
  <pre><code>\r\n\r\n
  </code></pre>
  
  <p>I'm trying to figure out how to convert </p>
  
  <pre><code>\r \n to &lt;p&gt; tags 
  </code></pre>
  
  <p>The HTML gets posted to the DB via XHR, and post in firebug shows it like this:</p>
  
  <pre><code>html:
  
  &lt;html&gt;&lt;head&gt;\r\n&lt;meta http-equiv=Content-Type content=text/html; charset=utf-8&gt;\r\n&lt;/head&gt;\r\n&lt;body&gt;\r\n&lt;pre style=word-wrap:break-word; font-size:10.0pt; font-family:Tahoma; color:black&gt;YADA YADA YADAYADA YADA YADAYADA YADA YADAYADA YADA YADA!\n\n YADA YADA YADAYADA YADA YADAYADA YADA YADAYADA YADA YADA.\n\nYADA YADA YADA\n\n&amp;lt; via mobile device &amp;gt;\n\nYADA YADA YADA &amp;lt;xxxx@xxxxx.com&amp;gt; wrote:\n\n&lt;/pre&gt;\r\n&lt;div&gt;\r\n&lt;table cellpadding=0 cellspacing=0 border=0 width=700 style=padding:0;&gt;\r\n&lt;tbody&gt;\r\n&lt;tr&gt;\r\n&lt;td colspan=2 style=color:#000000;font-size:11px;font-family:'lucida grande', tahoma, verdana, arial, sans-serif valign=top&gt;\r\n&lt;div style=width:100%;font-size:12px;font-family:Helvetica;line-height:18px;&gt;..... and it keeps going.
  </code></pre>
  
  <p>But when I use simple_format: </p>
  
  <pre><code>body = simple_format(@html)
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code> &lt;p&gt;\r\n\r\n\r\n\r\n&lt;pre&gt;YADA YADA YADAYAD........ 
  </code></pre>
  
  <p>Why isn't simple_format getting rid of the \r and \n and using paragraphs? </p>
  
  <p>Thank you for your time.</p>