hiccup.util
Utility functions for Hiccup.
raw-string
(raw-string & xs)
Converts one or more strings into an object that will not be escaped when used with the hiccup2.core/html macro.
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"
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 hiccup.core/html or hiccup2.core/html macros.
with-encoding
macro
(with-encoding encoding & body)
Sets a default encoding for URL encoding strings. Defaults to UTF-8.