Skip to content

Commit 623b1d4

Browse files
authored
Rollup merge of #112581 - TumoiYorozu:fix_url_encoding_of_percent_sign, r=notriddle
[rustdoc] Fix URL encoding of % sign Fix #112580 The % is encoded as %%, but the correct encoding is %25.
2 parents e3021b4 + 7b55f08 commit 623b1d4

File tree

1 file changed

+0
-2
lines changed
  • src/librustdoc/html/render

1 file changed

+0
-2
lines changed

src/librustdoc/html/render/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1940,8 +1940,6 @@ pub(crate) fn small_url_encode(s: String) -> String {
19401940
// While the same is not true for hashes, rustdoc only needs to be
19411941
// consistent with itself when encoding them.
19421942
st += "+";
1943-
} else if b == b'%' {
1944-
st += "%%";
19451943
} else {
19461944
write!(st, "%{:02X}", b).unwrap();
19471945
}

0 commit comments

Comments
 (0)