Skip to content

Commit 1318d46

Browse files
committed
fix percent encoding on control chars
1 parent 1c61c39 commit 1318d46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/util.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ let percent_encode ?(skip = fun _ -> false) s =
66
| ( ' ' | '!' | '"' | '#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+'
77
| ',' | '/' | ':' | ';' | '=' | '?' | '@' | '[' | ']' | '~' ) as c ->
88
Printf.bprintf buf "%%%X" (Char.code c)
9-
| c when Char.code c > 127 -> Printf.bprintf buf "%%%X" (Char.code c)
9+
| c when Char.code c < 32 || Char.code c > 127 ->
10+
Printf.bprintf buf "%%%X" (Char.code c)
1011
| c -> Buffer.add_char buf c)
1112
s;
1213
Buffer.contents buf

0 commit comments

Comments
 (0)