1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 01:51:23 +02: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

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