Bug with searching multiline columns + fix

Bug with searching multiline columns + fix

motmot Posts: 5Questions: 0Answers: 0
edited April 2010 in Bug reports
DataTables can not search in multiline (containing '\n') columns. Fix is provided.
[code]var rpSearch = new RegExp( sRegExpString, "i" );[/code]
[code]var rpSearch = new RegExp( sRegExpString, "im" );[/code]


  • CassiannoCassianno Posts: 19Questions: 0Answers: 0
    A column multilined isnt breaked within BR's?

    Anyway, thanks for you contribution... Some1 may be need this (or even me later ^^)
  • allanallan Posts: 62,188Questions: 1Answers: 10,199 Site admin
    Actually DataTables should be stripping new lines from the input for exactly this reason. This line "return sData.replace(/\n/g," ");" in _fnDataToSearch() is what does that. Perhaps you could provide an example of this not working please? The zero config example ( http://datatables.net/examples/basic_init/zero_config.html ) has a newline in "Internet Explorer 4.0" to test exactly this.

This discussion has been closed.