about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-15 18:50:24 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-15 18:50:24 +0200
commit38cca168130a1376e3a891d7215e0472f008d50a (patch)
tree102cb4d7df5bcfec3122c38beddfd3f1d629eee6 /src/utils
parent73c9788a7bd64a7f74d9e40b8ab5963817dad59e (diff)
downloadchawan-38cca168130a1376e3a891d7215e0472f008d50a.tar.gz
data urls: percent decode
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 257bdc66..f146b445 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -535,8 +535,8 @@ func percentEncode*(c: char, set: set[char], spaceAsPlus = false): string {.inli
 func percentEncode*(s: string, set: set[char], spaceAsPlus = false): string =
   result.percentEncode(s, set, spaceAsPlus)
 
-func percentDecode*(input: string): string =
-  var i = 0
+func percentDecode*(input: string, si = 0): string =
+  var i = si
   while i < input.len:
     let c = input[i]
     if c != '%' or i + 2 >= input.len: