From 4d3516ec8f428f3c8aae2cda4aa3ad014a61a612 Mon Sep 17 00:00:00 2001 From: Plague Fox Date: Tue, 28 Nov 2023 06:58:25 +0400 Subject: [PATCH] Update _decodeComponent --- lib/src/state/state_util.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/state/state_util.dart b/lib/src/state/state_util.dart index c426e36..fc5f662 100644 --- a/lib/src/state/state_util.dart +++ b/lib/src/state/state_util.dart @@ -275,7 +275,13 @@ abstract final class StateUtil { static String _decodeComponent(String component) { try { + if (component.codeUnits.any((e) => e > 127)) return component; return Uri.decodeComponent(component); + // ignore: avoid_catching_errors + } on ArgumentError { + return component; + } on FormatException { + return component; } on Object { return component; }