1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-20 15:17:07 +00:00

Improve change askama_escape in favor of v_htmlescape (#651)

This commit is contained in:
Juan Aguilar 2019-01-03 20:34:18 +01:00 committed by Douman
parent 61883042c2
commit 55a2a59906
3 changed files with 8 additions and 3 deletions

View file

@ -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"

View file

@ -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)
}
// " -- &quot; & -- &amp; ' -- &#x27; < -- &lt; > -- &gt; / -- &#x2f;
macro_rules! encode_file_name {
($entry:ident) => {

View file

@ -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]