Additionally to `encodeURIComponent` it would be helpful to pass a custom encode (or escape) function to `stringify`. For example, this would allow you to [strip unsafe HTML tags](https://github.com/theSmaw/Caja-HTML-Sanitizer).