URL Operators

When we need to work with urls, these operators will help with your markdown.

List of Operators


Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.


  • str {String}: The un-encoded string
  • returns {String}: The endcoded string


Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc.


  • str {String}
  • returns {String}: Escaped string.


Decode a Uniform Resource Identifier (URI) component.


  • str {String}
  • returns {String}


Alias for encodeURI.


Alias for decodeURI.


Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.


  • base {String}
  • href {String}
  • returns {String}


Parses a url string into an object.


  • str {String}: URL string
  • returns {String}: Returns stringified JSON


Strip the query string from the given url.


  • url {String}
  • returns {String}: the url without the queryString


Strip protocol from a url. Useful for displaying media that may have an 'http' protocol on secure connections.


  • str {String}
  • returns {String}: the url with http protocol stripped


<!-- url = 'http://foo.bar' -->
{{stripProtocol url}}
<!-- results in: '//foo.bar' -->