private String encode(String value, Page page) { if (StringUtils.isEmpty(value)) { return ""; } String val = StringUtils.replace( SessionStorage.getInstance(page.getRequest()).encodeURL(value), " ", "%20"); int pos = val.indexOf(";"); if (pos > -1) { if (pos == 0) { return ""; } val = val.substring(0, pos); } return val; }