I'm making a custom sorting tool for my custom gridview.
I use jQuery ui $.autocomplete() to find DISTINCT VALUEs from a COLUMN in a TABLE.
I then add the selected values to a jquery ui $.selectable().
I usually use the id attribute to store distinct type values like this (such as TABLE PRIMARYies), so my problem comes in when I try to store these values where they probably will not be compliant with HTML id standards or readable by jQuery.
How can I create a function to escape and de-escape any text from a database into HTML id readable by jQuery and back again?