Skip to content

Commit

Permalink
Rollup merge of #112581 - TumoiYorozu:fix_url_encoding_of_percent_sig…
Browse files Browse the repository at this point in the history
…n, r=notriddle

[rustdoc] Fix URL encoding of % sign

Fix #112580

The % is encoded as %%, but the correct encoding is %25.
  • Loading branch information
matthiaskrgr authored Jun 14, 2023
2 parents e3021b4 + 7b55f08 commit 623b1d4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1940,8 +1940,6 @@ pub(crate) fn small_url_encode(s: String) -> String {
// While the same is not true for hashes, rustdoc only needs to be
// consistent with itself when encoding them.
st += "+";
} else if b == b'%' {
st += "%%";
} else {
write!(st, "%{:02X}", b).unwrap();
}
Expand Down

0 comments on commit 623b1d4

Please sign in to comment.