Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace askama_escape in favor of v_htmlescape #2824

Merged
merged 3 commits into from Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion actix-files/Cargo.toml
Expand Up @@ -27,7 +27,6 @@ actix-service = "2"
actix-utils = "3"
actix-web = { version = "4", default-features = false }

askama_escape = "0.10"
bitflags = "1"
bytes = "1"
derive_more = "0.99.5"
Expand All @@ -38,6 +37,7 @@ mime = "0.3"
mime_guess = "2.0.1"
percent-encoding = "2.1"
pin-project-lite = "0.2.7"
v_htmlescape= "0.15"

# experimental-io-uring
[target.'cfg(target_os = "linux")'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions actix-files/src/directory.rs
@@ -1,8 +1,8 @@
use std::{fmt::Write, fs::DirEntry, io, path::Path, path::PathBuf};

use actix_web::{dev::ServiceResponse, HttpRequest, HttpResponse};
use askama_escape::{escape as escape_html_entity, Html};
use percent_encoding::{utf8_percent_encode, CONTROLS};
use v_htmlescape::escape as escape_html_entity;

/// A directory; responds with the generated directory listing.
#[derive(Debug)]
Expand Down Expand Up @@ -59,7 +59,7 @@ macro_rules! encode_file_url {
/// ```
macro_rules! encode_file_name {
($entry:ident) => {
escape_html_entity(&$entry.file_name().to_string_lossy(), Html)
escape_html_entity(&$entry.file_name().to_string_lossy())
};
}

Expand Down