urllib: fix string length in escape()
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