Skip to content

Instantly share code, notes, and snippets.

@theaxel
Created September 5, 2013 07:45
Show Gist options
  • Save theaxel/6447139 to your computer and use it in GitHub Desktop.
Save theaxel/6447139 to your computer and use it in GitHub Desktop.
U_STRINGPREP_PROHIBITED_ERROR
diff --git a/lib/node-xmpp/lib/xmpp/jid.js b/lib/node-xmpp/lib/xmpp/jid.js
index a25c326..747197a 100644
--- a/lib/node-xmpp/lib/xmpp/jid.js
+++ b/lib/node-xmpp/lib/xmpp/jid.js
@@ -4,7 +4,12 @@ try {
var c = function(n) {
var p = new StringPrep(n);
return function(s) {
- return p.prepare(s);
+ try {
+ return p.prepare(s);
+ } catch (e) {
+ p = new StringPrep(n);
+ throw e;
+ }
};
};
var nameprep = c('nameprep');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment