I've seen stuff advertised somewhere (can't remember where or when) that you spray on the liner and let dry. Personally, unless its a reallly high dollar hat, I'd just swish some mild detergent, or a little bit of dishwashing det, with warm water and rinse well. Might take a while to dry; just sit it out in the TX sun.
Most helmet liners are just foam with a padded liner. Not much to harm.
Matter of fact, my old one...which I still prefer over the new one..is also sort of funky. I'll go give it a sood swish and let you know the results in a day or so when it drys.