There are some characters that can't be used in filenames:
/ \ ? * : | " < >
To accurately strip all of them use Zaru or parameterize
:
Zaru.sanitize! " what\ver//wird:user:nput:"
# => "what erwirdusernput"
" what\ver//wird:user:nput:".parameterize
# => "what-er-wird-user-nput"