title: Ruby on Rails CSV putting &quot;&quot; instead of actual quotes
body: <p>I am attempting to generate a CSV file. Everything is fine except for blank fields, I'm not quite sure have <code>&amp;quot;&amp;quot;</code> instead of actual quotes. I've provided the code I'm using to generate the file and some output.</p>
  
  <pre><code>&lt;% headers = ["Username", "Name", "E-mail", "Phone Number"] %&gt;
  &lt;%= CSV.generate_line headers %&gt;
  
  &lt;% @users_before_paginate.each do |user| %&gt;
    &lt;% row = [ "#{user.username}".html_safe ] %&gt;
    &lt;% row &lt;&lt; "#{user.profile.first_name} #{user.profile.last_name}".html_safe unless user.profile.blank? %&gt;
    &lt;% row &lt;&lt; "#{user.email}".html_safe unless user.profile.nil? %&gt;
    &lt;% row &lt;&lt; "#{user.profile.phone}".html_safe unless user.profile.nil? %&gt;
    &lt;%= CSV.generate_line row %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>Username,Name,E-mail,Phone Number
  
    admin,LocalShopper ,shoplocally1@gmail.com,&amp;quot;&amp;quot;
    Brian,Oliveri Design ,brian@oliveridesign.com,727-537-9617
    LocalShopperJenn,Jennifer M Gentile ,localshopperjenn@hotmail.com,&amp;quot;&amp;quot;
  </code></pre>