hiccup.util
Utility functions for Hiccup.
as-str
(as-str & xs)
Converts its arguments into a string using to-str.
escape-html
(escape-html text)
Change special characters into HTML character entities.
ToString
protocol
members
to-str
(to-str x)
Convert a value into a string.
ToURI
protocol
members
to-uri
(to-uri x)
Convert a value into a URI.
url
(url & args)
Creates a URI instance from a variable list of arguments and an optional
parameter map as the last argument. For example:
(url "/group/" 4 "/products" {:page 9})
=> "/group/4/products?page=9"
URLEncode
protocol
members
url-encode
(url-encode x)
Turn a value into a URL-encoded string.
with-base-url
macro
(with-base-url base-url & body)
Sets a base URL that will be prepended onto relative URIs. Note that for this
to work correctly, it needs to be placed outside the html macro.
with-encoding
macro
(with-encoding encoding & body)
Sets a default encoding for URL encoding strings. Defaults to UTF-8.