title: Exporting html table excel using java script. not exporting when it find '#' chracter
body: <p>I need a JavaScript to export HTML tables to Excel. 
  I have tried this script, it is exporting but when it found special character i.e '#' it stopping there it self
  not exporting further lines.</p>
  
  <p>can anyone help me out,thanks in advance    </p>
  
  <pre><code>&lt;script src="/tpComment.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript"&gt;
              \$(function() {
              \$("#btnExport").click(function(e) {
      var data_type = 'data:application/vnd.ms-excel';
      var table_div = document.getElementById('dvData');
      var table_html = table_div.outerHTML.replace(/ /g, '%20');
      window.open(data_type + ', ' + table_html);
      e.preventDefault();
       //getting values of current time for generating the file name
  });
  });
  &lt;/script&gt;
  
  &lt;input type="button" onclick="CreateExcelSheet()" value="Create Excel Sheet"&gt;
  &lt;div id="dvData" &gt;
  &lt;table &gt;
      &lt;tr&gt;
      &lt;th&gt;name&lt;/th&gt;
      &lt;th&gt; address &lt;/th&gt;
      &lt;th&gt; no &lt;/th&gt;
      &lt;/tr&gt;&lt;tr&gt;
      &lt;td&gt;ABC&lt;/td&gt;
      &lt;td&gt;#17 &lt;/td&gt;
      &lt;td&gt;99999&lt;/td&gt;
      &lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
  </code></pre>