Fix function name, move regexp patterns to private variables, remove unnecessary regexp

Since all characters except alphanumeric, spaces, underscores, and
dashes are removed, there is no need to explicitly remove special url
characters