Changeset 8604


Ignore:
Timestamp:
2004-11-19T14:50:04+13:00 (19 years ago)
Author:
nzdl
Message:

some a tags are not links, so don't add back the href if there wasn't one to start with, in encodeURLs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r8162 r8604  
    267267        // ugly hack to get rid of : in the args - interferes with session handling
    268268        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));
     269        if (!href.equals("")) {
     270        if (href.indexOf("?")!=-1) {
     271            String[] parts = href.split("\\?", -1);
     272            parts[1]=parts[1].replaceAll(":", "%3A");
     273            href = parts[0]+"?"+parts[1];
     274        }
     275        a.setAttribute("href", response.encodeURL(href));
     276        }
    275277    }
    276278   
Note: See TracChangeset for help on using the changeset viewer.