Instead of using a function for this, just assign the escaped input to a var once:

```js
var input = self.recipient.value;
var escaped = input.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
```

Ideally the regexp would be assigned to it's own identifier to avoid re-compiling everytime it's used, but I can live without that.