Changeset 8162 for trunk/gsdl3/src
- Timestamp:
- 2004-09-27T16:12:54+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r6301 r8162 232 232 Element param = this.doc.createElement(GSXML.PARAM_ELEM); 233 233 param.setAttribute(GSXML.NAME_ATT, name); 234 param.setAttribute(GSXML.VALUE_ATT, GSXML.xmlSafe((String)session.getAttribute(name))); 234 String value = GSXML.xmlSafe((String)session.getAttribute(name)); 235 // ugly hack to undo : escaping 236 value = value.replaceAll("%3A", "\\:"); 237 param.setAttribute(GSXML.VALUE_ATT,value); 235 238 xml_param_list.appendChild(param); 236 239 } … … 251 254 /** this goes through each URL and adds in a session id if needed-- 252 255 * its needed if the browser doesn't accept cookies 256 * also escapes things if needed 253 257 */ 254 258 protected void encodeURLs(Element data, HttpServletResponse response) { … … 261 265 for (int i=0; i<hrefs.getLength(); i++) { 262 266 Element a = (Element)hrefs.item(i); 263 a.setAttribute("href", response.encodeURL(a.getAttribute("href"))); 267 // ugly hack to get rid of : in the args - interferes with session handling 268 String href = a.getAttribute("href"); 269 if (href.indexOf("?")!=-1) { 270 String[] parts = href.split("\\?", -1); 271 parts[1]=parts[1].replaceAll(":", "%3A"); 272 href = parts[0]+"?"+parts[1]; 273 } 274 a.setAttribute("href", response.encodeURL(href)); 264 275 } 265 276
Note:
See TracChangeset
for help on using the changeset viewer.