You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2008/02/03 01:45:42 UTC
svn commit: r617935 -
/incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
Author: jmsnell
Date: Sat Feb 2 16:45:39 2008
New Revision: 617935
URL: http://svn.apache.org/viewvc?rev=617935&view=rev
Log:
escaping bug
Modified:
incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
Modified: incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java?rev=617935&r1=617934&r2=617935&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java (original)
+++ incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java Sat Feb 2 16:45:39 2008
@@ -29,9 +29,7 @@
import org.apache.abdera.ext.thread.InReplyTo;
import org.apache.abdera.ext.thread.ThreadHelper;
import org.apache.abdera.i18n.iri.IRI;
-import org.apache.abdera.i18n.text.UrlEncoding;
import org.apache.abdera.i18n.text.Bidi.Direction;
-import org.apache.abdera.i18n.text.CharUtils.Profile;
import org.apache.abdera.model.Base;
import org.apache.abdera.model.Categories;
import org.apache.abdera.model.Category;
@@ -397,7 +395,11 @@
"src".equalsIgnoreCase(name) ||
"action".equalsIgnoreCase(name))) {
IRI base = child.getResolvedBaseUri();
- val = UrlEncoding.encode(val.trim(),Profile.IUNRESERVED.filter(),Profile.RESERVED.filter(),Profile.IPRIVATE.filter());
+// val = UrlEncoding.encode(
+// val.trim(),
+// Profile.IUNRESERVED.filter(),
+// Profile.RESERVED.filter(),
+// Profile.IPRIVATE.filter());
if (base != null) val = base.resolve(val).toASCIIString();
}
jstream.writeQuoted(val);
Re: svn commit: r617935 - /incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Feb 2, 2008 7:45 PM, <jm...@apache.org> wrote:
> @@ -397,7 +395,11 @@
> "src".equalsIgnoreCase(name) ||
> "action".equalsIgnoreCase(name))) {
> IRI base = child.getResolvedBaseUri();
> - val = UrlEncoding.encode(val.trim(),Profile.IUNRESERVED.filter(),Profile.RESERVED.filter(),Profile.IPRIVATE.filter());
> +// val = UrlEncoding.encode(
> +// val.trim(),
> +// Profile.IUNRESERVED.filter(),
> +// Profile.RESERVED.filter(),
> +// Profile.IPRIVATE.filter());
> if (base != null) val = base.resolve(val).toASCIIString();
Umm, if there's an escaping bug in this code can you do more than just
comment it out? Either remove the code entirely or if it must remain
at least leave a comment describing why it's commented out.
I never understand why people comment out code like this. We have a
version control system, if we need to get it back it's a simple 'svn
merge' away...
-garrett