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