unicorn commit: ~ fix for ticket #135: handle & in submitted uris correctly

changeset:   1499:3a31f319c56d
tag:         tip
user:        Thomas Gambet <tgambet@w3.org>
date:        Fri Sep 17 17:22:49 2010 -0400
files:       src/org/w3c/unicorn/input/URIInputModule.java src/org/w3c/unicorn/input/URIInputParameter.java
description:
~ fix for ticket #135: handle & in submitted uris correctly


diff -r 7c319a2acf1f -r 3a31f319c56d src/org/w3c/unicorn/input/URIInputModule.java
--- a/src/org/w3c/unicorn/input/URIInputModule.java	Fri Sep 17 17:21:40 2010 -0400
+++ b/src/org/w3c/unicorn/input/URIInputModule.java	Fri Sep 17 17:22:49 2010 -0400
@@ -11,7 +11,6 @@
 
 import javax.activation.MimeType;
 
-import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3c.unicorn.contract.EnumInputMethod;
@@ -64,7 +63,6 @@
 		}
 		this.aMimeType = aMimeType;
 		this.sURI = (String) oInputParameterValue;
-		this.sURI = StringEscapeUtils.escapeHtml(this.sURI);
 	}
 
 	/**
diff -r 7c319a2acf1f -r 3a31f319c56d src/org/w3c/unicorn/input/URIInputParameter.java
--- a/src/org/w3c/unicorn/input/URIInputParameter.java	Fri Sep 17 17:21:40 2010 -0400
+++ b/src/org/w3c/unicorn/input/URIInputParameter.java	Fri Sep 17 17:22:49 2010 -0400
@@ -24,6 +24,7 @@
 import javax.net.ssl.SSLHandshakeException;
 import javax.net.ssl.TrustManager;
 
+import org.apache.commons.lang.StringEscapeUtils;
 import org.w3c.unicorn.contract.EnumInputMethod;
 import org.w3c.unicorn.exceptions.UnicornException;
 import org.w3c.unicorn.request.TrustAllManager;
@@ -148,7 +149,7 @@
 
 	@Override
 	public String getDocumentName() {
-		return uri;
+		return StringEscapeUtils.escapeHtml(uri);
 	}
 
 	@Override

Received on Friday, 17 September 2010 21:26:29 UTC