Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/AdblockPlus.java

Issue 9570024: ABP/Android Fix crash on unescaped uri (Closed)
Patch Set: Created March 6, 2013, 2:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« jni/jsEngine.cpp ('K') | « jni/jsEngine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/AdblockPlus.java
===================================================================
--- a/src/org/adblockplus/android/AdblockPlus.java
+++ b/src/org/adblockplus/android/AdblockPlus.java
@@ -439,11 +439,11 @@
MatchesCallable(String url, String query, String reqHost, String refHost, String accept)
{
- this.url = url;
- this.query = query;
- this.reqHost = reqHost != null ? reqHost : "";
- this.refHost = refHost != null ? refHost : "";
- this.accept = accept != null ? accept : "";
+ this.url = StringEscapeUtils.escapeJavaScript(url);
+ this.query = StringEscapeUtils.escapeJavaScript(query);
+ this.reqHost = reqHost != null ? StringEscapeUtils.escapeJavaScript(reqHost) : "";
+ this.refHost = refHost != null ? StringEscapeUtils.escapeJavaScript(refHost) : "";
+ this.accept = accept != null ? StringEscapeUtils.escapeJavaScript(accept) : "";
}
@Override
« jni/jsEngine.cpp ('K') | « jni/jsEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld