chore(files): upgrade v_htmlescape to 0.17 (#4048)

This commit is contained in:
Yuki Okushi 2026-04-27 02:40:14 +09:00 committed by GitHub
parent d0fa09eb83
commit 5bc18551cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 6 deletions

15
Cargo.lock generated
View File

@ -3440,10 +3440,19 @@ dependencies = [
]
[[package]]
name = "v_htmlescape"
version = "0.15.8"
name = "v_escape-base"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c"
checksum = "f1212fce830b75af194b578e55b3db9049f2c8c45f58d397fb25602fdb50fb3d"
[[package]]
name = "v_htmlescape"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "befb3d53c9e3ec641417685896cbc8cc5bd264d6a2e190c56aaef1af24740d99"
dependencies = [
"v_escape-base",
]
[[package]]
name = "vcpkg"

View File

@ -7,6 +7,7 @@
- Fix handling of `bytes=0-`
- Fix `NamedFile` panic when serving files with pre-UNIX epoch modification times. [#2748]
- Fix invalid `Content-Encoding: identity` header in `NamedFile` range responses. [#3191]
- Update `v_htmlescape` dependency to `0.17`.
[#3402]: https://github.com/actix/actix-web/issues/3402
[#2615]: https://github.com/actix/actix-web/pull/2615

View File

@ -32,7 +32,7 @@ mime = "0.3.9"
mime_guess = "2.0.1"
percent-encoding = "2.1"
pin-project-lite = "0.2.7"
v_htmlescape = "0.15.5"
v_htmlescape = "0.17"
# experimental-io-uring
[target.'cfg(target_os = "linux")'.dependencies]

View File

@ -7,7 +7,7 @@ use std::{
use actix_web::{dev::ServiceResponse, HttpRequest, HttpResponse};
use percent_encoding::{utf8_percent_encode, CONTROLS};
use v_htmlescape::escape as escape_html_entity;
use v_htmlescape::escape_fmt;
/// A directory; responds with the generated directory listing.
#[derive(Debug)]
@ -64,7 +64,7 @@ macro_rules! encode_file_url {
/// ```
macro_rules! encode_file_name {
($entry:ident) => {
escape_html_entity(&$entry.file_name().to_string_lossy())
escape_fmt(&$entry.file_name().to_string_lossy())
};
}