diff options
author | vallentin <mail@vallentin.dev> | 2021-01-06 22:57:10 +0100 |
---|---|---|
committer | Christian Vallentin <vallentinsource@gmail.com> | 2021-01-06 23:08:11 +0100 |
commit | 560d219c269bbf291a4f78e8ef3ffeb0d02ffdef (patch) | |
tree | d54a5528aa4794acbe04164b53da4063ad77a426 /askama_shared | |
parent | 116d96dd3030a6806115dd3e1c7a17dcb8b80774 (diff) | |
download | askama-560d219c269bbf291a4f78e8ef3ffeb0d02ffdef.tar.gz askama-560d219c269bbf291a4f78e8ef3ffeb0d02ffdef.tar.bz2 askama-560d219c269bbf291a4f78e8ef3ffeb0d02ffdef.zip |
Added urlencode filter to book
Diffstat (limited to 'askama_shared')
-rw-r--r-- | askama_shared/src/filters/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs index 6838d57..58bcc47 100644 --- a/askama_shared/src/filters/mod.rs +++ b/askama_shared/src/filters/mod.rs @@ -122,7 +122,7 @@ pub fn filesizeformat<B: FileSize>(b: &B) -> Result<String> { } #[cfg(feature = "percent-encoding")] -/// Percent-encodes the argument for safe use in URI; does not encode `/` +/// Percent-encodes the argument for safe use in URI; does not encode `/`. /// /// This should be safe for all parts of URI (paths segments, query keys, query /// values). In the rare case that the server can't deal with forward slashes in @@ -134,8 +134,8 @@ pub fn filesizeformat<B: FileSize>(b: &B) -> Result<String> { /// with the exception of `/`. /// /// ```none,ignore -/// <a href="/metro{{ "/stations/Château d'Eau" | urlencode }}">Station</a> -/// <a href="/page?text={{ "look, unicode/emojis ✨" | urlencode }}">Page</a> +/// <a href="/metro{{ "/stations/Château d'Eau"|urlencode }}">Station</a> +/// <a href="/page?text={{ "look, unicode/emojis ✨"|urlencode }}">Page</a> /// ``` /// /// To encode `/` as well, see [`urlencode_strict`](./fn.urlencode_strict.html). @@ -147,7 +147,7 @@ pub fn urlencode<T: fmt::Display>(s: T) -> Result<String> { } #[cfg(feature = "percent-encoding")] -/// Percent-encodes the argument for safe use in URI; encodes `/` +/// Percent-encodes the argument for safe use in URI; encodes `/`. /// /// Use this filter for encoding query keys and values in the rare case that /// the server can't process them unencoded. @@ -157,7 +157,7 @@ pub fn urlencode<T: fmt::Display>(s: T) -> Result<String> { /// as specified by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.3). /// /// ```none,ignore -/// <a href="/page?text={{ "look, unicode/emojis ✨" | urlencode_strict }}">Page</a> +/// <a href="/page?text={{ "look, unicode/emojis ✨"|urlencode_strict }}">Page</a> /// ``` /// /// If you want to preserve `/`, see [`urlencode`](./fn.urlencode.html). |