Commit fc55a31f authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1381] [JM-1393] Escaping vcard ldap fields now to eliminate problem of...

[JM-1381] [JM-1393] Escaping vcard ldap fields now to eliminate problem of dollar signs throwing it for a loop.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10684 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6aa0314b
......@@ -24,6 +24,7 @@ import org.xmpp.packet.JID;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import java.util.*;
import java.util.regex.Matcher;
/**
* Read-only LDAP provider for vCards.Configuration consists of adding a provider:<p/>
......@@ -513,7 +514,7 @@ public class LdapVCardProvider implements VCardProvider, PropertyEventListener {
String field = st.nextToken();
String attrib = field.replaceAll("(\\{)(" + field + ")(})", "$2");
String value = map.get(attrib);
format = format.replaceFirst("(\\{)(" + field + ")(})", value);
format = format.replaceFirst("(\\{)(" + field + ")(})", Matcher.quoteReplacement(value));
}
emement.setText(format);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment