From 0b816e165d651377fb32020a6d11f7f0d67b34e3 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 26 Apr 2026 14:51:23 +0900 Subject: [PATCH] chore(files): upgrade v_htmlescape to 0.17 --- Cargo.lock | 15 ++++++++++++--- actix-files/CHANGES.md | 1 + actix-files/Cargo.toml | 2 +- actix-files/src/directory.rs | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3ad1bcaaf..b40f301a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md index 43a7f20f8..aea6fe8f4 100644 --- a/actix-files/CHANGES.md +++ b/actix-files/CHANGES.md @@ -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 diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml index 65e91cafd..bfb49d4b3 100644 --- a/actix-files/Cargo.toml +++ b/actix-files/Cargo.toml @@ -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] diff --git a/actix-files/src/directory.rs b/actix-files/src/directory.rs index 6ade424b9..9513f6c06 100644 --- a/actix-files/src/directory.rs +++ b/actix-files/src/directory.rs @@ -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()) }; }