mirror of
https://github.com/actix/actix-web.git
synced 2024-12-30 03:50:42 +00:00
Improve change askama_escape in favor of v_htmlescape (#651)
This commit is contained in:
parent
61883042c2
commit
55a2a59906
3 changed files with 8 additions and 3 deletions
|
@ -64,7 +64,7 @@ cell = ["actix-net/cell"]
|
|||
actix = "0.7.9"
|
||||
actix-net = "0.2.6"
|
||||
|
||||
askama_escape = "0.1.0"
|
||||
v_htmlescape = "0.3.2"
|
||||
base64 = "0.10"
|
||||
bitflags = "1.0"
|
||||
failure = "^0.1.2"
|
||||
|
|
|
@ -11,7 +11,7 @@ use std::{cmp, io};
|
|||
#[cfg(unix)]
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
use askama_escape::{escape as escape_html_entity};
|
||||
use v_htmlescape::HTMLEscape;
|
||||
use bytes::Bytes;
|
||||
use futures::{Async, Future, Poll, Stream};
|
||||
use futures_cpupool::{CpuFuture, CpuPool};
|
||||
|
@ -569,6 +569,11 @@ macro_rules! encode_file_url {
|
|||
};
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn escape_html_entity(s: &str) -> HTMLEscape {
|
||||
HTMLEscape::from(s)
|
||||
}
|
||||
|
||||
// " -- " & -- & ' -- ' < -- < > -- > / -- /
|
||||
macro_rules! encode_file_name {
|
||||
($entry:ident) => {
|
||||
|
|
|
@ -100,7 +100,6 @@ extern crate failure;
|
|||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate futures;
|
||||
extern crate askama_escape;
|
||||
extern crate cookie;
|
||||
extern crate futures_cpupool;
|
||||
extern crate http as modhttp;
|
||||
|
@ -137,6 +136,7 @@ extern crate serde_urlencoded;
|
|||
extern crate percent_encoding;
|
||||
extern crate serde_json;
|
||||
extern crate smallvec;
|
||||
extern crate v_htmlescape;
|
||||
|
||||
extern crate actix_net;
|
||||
#[macro_use]
|
||||
|
|
Loading…
Reference in a new issue