Remixml path-component filter
Performs a lossy transformation into a format that can be inserted into a URI path component.
Automatically registers itself as a Remixml filter using the name path
.
Basic usage
<set var="_.foo">SÖme text with a diacritic.</set>
Then insert /this/is/a/sanitised/&_.foo:path;/path using the path filter.
Requirements
It runs inside any webbrowser or NodeJS environment.
Reference documentation
-
RemixmlPathencode.encode(string)
Performs a lossy transformation ofstring
into a format that can be inserted into a URI path component:- Cast to lowercase.
- Replace diacritics by their ASCII equivalent.
- Replace all strings of non-alphanumeric characters with single dashes.
- Strip dashes from start and end.
References
- Used by the high performance Javascript templating engine Remixml.
- Compatible with the fastest lockandload AMD-loader.
Card-carrying member of the zerodeps
movement.