Removed redundant character escapes to fix lint errors.
This commit is contained in:
parent
bf4c90b121
commit
13c6594e0c
@ -40,7 +40,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,11 +35,11 @@ class WebAddress {
|
|||||||
private static final int MATCH_GROUP_PORT = 4;
|
private static final int MATCH_GROUP_PORT = 4;
|
||||||
private static final int MATCH_GROUP_PATH = 5;
|
private static final int MATCH_GROUP_PATH = 5;
|
||||||
private static final Pattern sAddressPattern = Pattern.compile(
|
private static final Pattern sAddressPattern = Pattern.compile(
|
||||||
/* scheme */"(?:(http|https|file)\\:\\/\\/)?" +
|
/* scheme */"(?:(http|https|file)://)?" +
|
||||||
/* authority */"(?:([-A-Za-z0-9$_.+!*'(),;?&=]+(?:\\:[-A-Za-z0-9$_.+!*'(),;?&=]+)?)@)?" +
|
/* authority */"(?:([-A-Za-z0-9$_.+!*'(),;?&=]+(?::[-A-Za-z0-9$_.+!*'(),;?&=]+)?)@)?" +
|
||||||
/* host */"([" + GOOD_IRI_CHAR + "%_-][" + GOOD_IRI_CHAR + "%_\\.-]*|\\[[0-9a-fA-F:\\.]+\\])?" +
|
/* host */"([" + GOOD_IRI_CHAR + "%_-][" + GOOD_IRI_CHAR + "%_\\.-]*|\\[[0-9a-fA-F:\\.]+\\])?" +
|
||||||
/* port */"(?:\\:([0-9]*))?" +
|
/* port */"(?::([0-9]*))?" +
|
||||||
/* path */"(\\/?[^#]*)?" +
|
/* path */"(/?[^#]*)?" +
|
||||||
/* anchor */".*", Pattern.CASE_INSENSITIVE);
|
/* anchor */".*", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ public class OutputFormatter {
|
|||||||
private static final int MIN_FIRST_PARAGRAPH_TEXT = 50; // Min size of first paragraph
|
private static final int MIN_FIRST_PARAGRAPH_TEXT = 50; // Min size of first paragraph
|
||||||
private static final int MIN_PARAGRAPH_TEXT = 30; // Min size of any other paragraphs
|
private static final int MIN_PARAGRAPH_TEXT = 30; // Min size of any other paragraphs
|
||||||
private static final List<String> NODES_TO_REPLACE = Arrays.asList("strong", "b", "i");
|
private static final List<String> NODES_TO_REPLACE = Arrays.asList("strong", "b", "i");
|
||||||
private Pattern unlikelyPattern = Pattern.compile("display\\:none|visibility\\:hidden");
|
private Pattern unlikelyPattern = Pattern.compile("display:none|visibility:hidden");
|
||||||
private final int minFirstParagraphText;
|
private final int minFirstParagraphText;
|
||||||
private final int minParagraphText;
|
private final int minParagraphText;
|
||||||
private final List<String> nodesToReplace;
|
private final List<String> nodesToReplace;
|
||||||
|
@ -253,7 +253,7 @@ class SHelper {
|
|||||||
public static String getUrlFromUglyGoogleRedirect(String url) {
|
public static String getUrlFromUglyGoogleRedirect(String url) {
|
||||||
if (url.startsWith("http://www.google.com/url?")) {
|
if (url.startsWith("http://www.google.com/url?")) {
|
||||||
url = url.substring("http://www.google.com/url?".length());
|
url = url.substring("http://www.google.com/url?".length());
|
||||||
String arr[] = urlDecode(url).split("\\&");
|
String arr[] = urlDecode(url).split("&");
|
||||||
for (String str : arr) {
|
for (String str : arr) {
|
||||||
if (str.startsWith("q="))
|
if (str.startsWith("q="))
|
||||||
return str.substring("q=".length());
|
return str.substring("q=".length());
|
||||||
|
@ -24,7 +24,7 @@ public class IntentUtils {
|
|||||||
+ // switch on case insensitive matching
|
+ // switch on case insensitive matching
|
||||||
'('
|
'('
|
||||||
+ // begin group for schema
|
+ // begin group for schema
|
||||||
"(?:http|https|file):\\/\\/" + "|(?:inline|data|about|javascript):" + "|(?:.*:.*@)"
|
"(?:http|https|file)://" + "|(?:inline|data|about|javascript):" + "|(?:.*:.*@)"
|
||||||
+ ')' + "(.*)");
|
+ ')' + "(.*)");
|
||||||
|
|
||||||
public IntentUtils(Activity activity) {
|
public IntentUtils(Activity activity) {
|
||||||
|
@ -28,7 +28,7 @@ public class UrlUtils {
|
|||||||
private static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile(
|
private static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile(
|
||||||
"(?i)" + // switch on case insensitive matching
|
"(?i)" + // switch on case insensitive matching
|
||||||
'(' + // begin group for schema
|
'(' + // begin group for schema
|
||||||
"(?:http|https|file):\\/\\/" +
|
"(?:http|https|file)://" +
|
||||||
"|(?:inline|data|about|javascript):" +
|
"|(?:inline|data|about|javascript):" +
|
||||||
"|(?:.*:.*@)" +
|
"|(?:.*:.*@)" +
|
||||||
')' +
|
')' +
|
||||||
|
Loading…
Reference in New Issue
Block a user