From c392ff7ed6499e00376737d4f2ffccccdee27c76 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 5 Dec 2022 18:09:46 +0100 Subject: Fix a punycode decoding bug --- src/utils/twtstr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 0bce4591..53d68798 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -528,7 +528,7 @@ func processIdna(str: string, checkhyphens, checkbidi, checkjoiners, transitiona var s = label if label.startsWith("xn--"): try: - s = punycode.decode(label) + s = punycode.decode(label.substr("xn--".len)) except PunyError: return none(string) #error #TODO check normalization -- cgit