title: Word wrap column data in Javascript datatable
body: <p>I have a JS datatable where we input customer information, on certain case some customer reference are as such </p>
  
  <pre><code>reference_text=%26reference%5Ftext%3D%2526reference%255Ftext%253Dtest%252520ipsum%25252C%25252008%25252DAug%25252D08%2546%26&amp;
  </code></pre>
  
  <p>This breaks my html table and forces a column to grow out of proportion as this does not contain a space, i have setup a example in JS fiddle to illustrate this issue, is there a way we can force this column to be in a consistent format with the other or wrap the text to make it fit in the column?</p>
  
  <pre><code>$(document).ready(function () {
      if ($('#report_gen_user').length) {
          $('#report_gen_user').dataTable(
                  {
                      "iDisplayLength": -1,
                      initComplete: function () {
                          var api = this.api();
  
                          api.columns().indexes().flatten().each(function (i) {
                              if (i == 2 ||  i == 9) {
                                  var column = api.column(i);
                                  var select = $('&lt;select&gt;&lt;option value=""&gt;&lt;/option&gt;&lt;/select&gt;')
                                          .appendTo($(column.footer()).empty())
                                          .on('change', function () {
  
                                              var val = $.fn.dataTable.util.escapeRegex(
                                                      $(this).val()
                                                      );
  
                                              column
                                                      .search(val ? '^' + val + '$' : '', true, false)
                                                      .draw();
                                          });
  
                                  column.data().unique().sort().each(function (d, j) {
                                      select.append('&lt;option value="' + d + '"&gt;' + d + '&lt;/option&gt;')
                                  });
  
                                  $(".hidefooter").html("");
                              }
                          });
                      },
                      "aLengthMenu": [
                          [15, 25, 35, 50, 100, -1],
                          [15, 25, 35, 50, 100, "All"]
                      ],
                      "aoColumnDefs": [{
                              "bVisible": false,
                              "aTargets": []
                          }],
                      "aaSorting": [],
                      "fnFooterCallback": function (nRow, aasData, iStart, iEnd, aiDisplay) {
  
                          var columnas = [1,  5]; //the columns you wish to add      
                          for (var j in columnas) {
                              var columnaActual = columnas[j];
                              var total = 0;
                              var allTimeTotal = 0;
                              for (var i = iStart; i &lt; iEnd; i++) {
                                  total = total + parseFloat(aasData[aiDisplay[i]][columnaActual]);
                              }
                              total = total.toFixed(2); 
                              for (var counter in aasData) {
                                   allTimeTotal = allTimeTotal + parseFloat(aasData[counter][columnaActual]);
                                  //console.log((aasData[counter][columnaActual]));
                              }
                              allTimeTotal = allTimeTotal.toFixed(2); 
                              if (total == allTimeTotal) {
                                  $($(nRow).children().get(columnaActual)).html(' '+total);
                              } else {
                                  $($(nRow).children().get(columnaActual)).html(' '+total + ' (' + allTimeTotal + ')');
                              }
  
                          } // end 
  
  
  
                      }
  
                  }
  
          );
      }
  })
  </code></pre>
  
  <p><a href="http://jsfiddle.net/63g6e655/3/" rel="noreferrer">http://jsfiddle.net/63g6e655/3/</a></p>