mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
urllib: fix string length in escape()
This commit is contained in:
parent
584786d87c
commit
dbaa37ea46
@ -277,7 +277,7 @@ fn escape(s string, mode EncodingMode) string {
|
|||||||
t[i] = `+`
|
t[i] = `+`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return string(t)
|
return string(t, t.len)
|
||||||
}
|
}
|
||||||
|
|
||||||
upperhex := '0123456789ABCDEF'
|
upperhex := '0123456789ABCDEF'
|
||||||
@ -297,7 +297,7 @@ fn escape(s string, mode EncodingMode) string {
|
|||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return string(t)
|
return string(t, t.len)
|
||||||
}
|
}
|
||||||
|
|
||||||
// A URL represents a parsed URL (technically, a URI reference).
|
// A URL represents a parsed URL (technically, a URI reference).
|
||||||
|
Loading…
Reference in New Issue
Block a user