public void encode(StringBuilder sb, String value) {
        if (value != null) {
            for (int i = 0; i < value.length(); i++) {
                char c = value.charAt(i);
                if (c == ' ') {
                    sb.append("\\s");
                } else if (c == '=') {
                    sb.append("\\e");
                } else if (c == '\\') {
                    sb.append("\\\\");
                } else {
                    sb.append(c);
                }
            }
        }
    }
Class that allows you to embed properties in a string. Used for some simple
stuff that is outside GWT (like data upload).
stroom-util-shared/src/main/java/stroom/util/shared/PropertyMap.java