moved the logic that detects and replaces special characters with nothing to the common.js file so it can be used by other areas of the application if needed