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

Unified Diff: adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java

Issue 29920555: Issue 6971 - Update regular expressions for resource type detection (Closed)
Patch Set: Created Oct. 23, 2018, 11:03 a.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
« no previous file with comments | « adblock-android-webview/build.gradle ('k') | adblock-android-webviewapp/build.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
diff --git a/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java b/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
index 44e6184c79ece049e6848ac1f57e96afeca6e92a..a31df135b3ee9d25e1ab36a387a8f949dbcd8f12 100644
--- a/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
+++ b/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
@@ -89,11 +89,11 @@ public class AdblockWebView extends WebView
private static final String[] EMPTY_ARRAY = {};
private static final String EMPTY_ELEMHIDE_ARRAY_STRING = "[]";
- private static final Pattern RE_JS = Pattern.compile("\\.js$", Pattern.CASE_INSENSITIVE);
- private static final Pattern RE_CSS = Pattern.compile("\\.css$", Pattern.CASE_INSENSITIVE);
- private static final Pattern RE_IMAGE = Pattern.compile("\\.(?:gif|png|jpe?g|bmp|ico)$", Pattern.CASE_INSENSITIVE);
- private static final Pattern RE_FONT = Pattern.compile("\\.(?:ttf|woff)$", Pattern.CASE_INSENSITIVE);
- private static final Pattern RE_HTML = Pattern.compile("\\.html?$", Pattern.CASE_INSENSITIVE);
+ private static final Pattern RE_JS = Pattern.compile("\\.js(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
+ private static final Pattern RE_CSS = Pattern.compile("\\.css(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
+ private static final Pattern RE_IMAGE = Pattern.compile("\\.(?:gif|png|jpe?g|bmp|ico)(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
+ private static final Pattern RE_FONT = Pattern.compile("\\.(?:ttf|woff)(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
+ private static final Pattern RE_HTML = Pattern.compile("\\.html?(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
private volatile boolean addDomListener = true;
private boolean adblockEnabled = true;
« no previous file with comments | « adblock-android-webview/build.gradle ('k') | adblock-android-webviewapp/build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld