This commit is contained in:
Horis
2025-04-14 13:18:29 +08:00
parent 37cd97c451
commit 3591493acd
@@ -323,10 +323,10 @@ class AnalyzeUrl(
checkEncoded: Boolean, checkEncoded: Boolean,
charset: Charset? charset: Charset?
) { ) {
val needEncode = checkEncoded && if (checkEncoded &&
((isQuery && !NetworkUtils.encodedQuery(value)) || !((isQuery && !NetworkUtils.encodedQuery(value)) ||
(!isQuery && !NetworkUtils.encodedForm(value))) (!isQuery && !NetworkUtils.encodedForm(value)))
if (!needEncode) { ) {
append(value) append(value)
} else if (charset == null) { } else if (charset == null) {
append(EncoderUtils.escape(value)) append(EncoderUtils.escape(value))