28 lines
967 B
Java
28 lines
967 B
Java
|
package com.google.common.net;
|
||
|
|
||
|
import com.google.common.escape.Escaper;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class UrlEscapers {
|
||
|
static final String URL_PATH_OTHER_SAFE_CHARS_LACKING_PLUS = "-._~!$'()*,;&=@:";
|
||
|
static final String URL_FORM_PARAMETER_OTHER_SAFE_CHARS = "-_.*";
|
||
|
private static final Escaper URL_FORM_PARAMETER_ESCAPER = new PercentEscaper(URL_FORM_PARAMETER_OTHER_SAFE_CHARS, true);
|
||
|
private static final Escaper URL_PATH_SEGMENT_ESCAPER = new PercentEscaper("-._~!$'()*,;&=@:+", false);
|
||
|
private static final Escaper URL_FRAGMENT_ESCAPER = new PercentEscaper("-._~!$'()*,;&=@:+/?", false);
|
||
|
|
||
|
private UrlEscapers() {
|
||
|
}
|
||
|
|
||
|
public static Escaper urlPathSegmentEscaper() {
|
||
|
return URL_PATH_SEGMENT_ESCAPER;
|
||
|
}
|
||
|
|
||
|
public static Escaper urlFragmentEscaper() {
|
||
|
return URL_FRAGMENT_ESCAPER;
|
||
|
}
|
||
|
|
||
|
public static Escaper urlFormParameterEscaper() {
|
||
|
return URL_FORM_PARAMETER_ESCAPER;
|
||
|
}
|
||
|
}
|