How to strip a filename of special characters?
If you have a specific set of characters that you want to keep, tr works very well. 

For example

tr -cd 'A-Za-z0-9_-'

Will remove any characters not in the set of characters listed.  (The -d means delete, and the -c means the complement of the characters listed: in other words, any character not listed gets deleted.)