bStateSave and backslashes

bStateSave and backslashes

shiftymccoolshiftymccool Posts: 19Questions: 1Answers: 0
edited January 2014 in General
Hello,

I've come across an issue with bStateSave retrieving values with backslashes. I'm using yadcf to filter columns, which works fine until I use search terms with backslashes (like regex).

When oData.aoSearchCols[key].sSearch = ^(401k|Compensation)$ state is loaded after a refresh without issue. When the value is something like ^(Candidate\ Email\ \(System\))$ no state is loaded, including column sorting, etc...

I've worked around this issue by doing some string manipulation in the fnStateSaveParams and fnStateLoadParams, but it feels like I'm missing something simple. I thought setting aoSearchCols: bEscapeRegex would help, but either it doesn't or I did it wrong.

Can you offer any advice? Let me know if there's more info that I can provide.

Thanks!

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    Could you possibly try this with DataTables 1.10 pre-beta please, and let me know how you get on: https://github.com/DataTables/DataTables/tree/master/media/js .

    Thanks,
    Allan
  • shiftymccoolshiftymccool Posts: 19Questions: 1Answers: 0
    Thanks for the quick response. I am unable to verify if it works or not since it seems to have broken my implementation of YADCF (where my search terms were coming from).

    I'm seeing the variable bRegex in the DataTables debug and it's set to false for these fields. Is there a place to set this to true, and would it help?

    Thanks again!
  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    I don't think it would help I'm afraid, since that has no baring on how the state is saved.

    Unfortunately 1.9.x isn't receiving any more updates, so this won't be resolved there unless yourself or some else hacks it in. 1.9.4 is the last planned release for 1.9.x.

    Allan
  • shiftymccoolshiftymccool Posts: 19Questions: 1Answers: 0
    I'll look into YADCF and DataTables 1.10.x,

    Thanks for the heads-up!
This discussion has been closed.