escape_pattern

Function escape_pattern 

Source
pub fn escape_pattern(path: &str) -> String
Expand description

Canonicalize the allowed/disallowed path patterns.

UTF-8 multibyte sequences (and other out-of-range ASCII values) are percent-encoded, and any existing percent-encoded values have their hex values normalised to uppercase.

For example:

    /SanJoséSellers ==> /Sanjos%C3%A9Sellers
    %aa ==> %AA

If the given path pattern is already adequately escaped, the original string is returned unchanged.