## backquotes become apostrophes:
gsub("`","'")
## backslashes become dashes:
gsub("\\\\","-")
## slashes, question marks, carats, dollarsigns become underscores:
gsub("[/?^$]","_")
That last one above shows one way to deal with characters you aren't sure about: enclose them inside square brackets and they are no longer special (except for backslashes, dashes, or a leading carat).