Refactoring naming of JavaScript escape function