Utility functions for Hiccup.
Utility functions for Hiccup.
(as-str & xs)Converts its arguments into a string using to-str.
Converts its arguments into a string using [[to-str]].
(escape-html text)Change special characters into HTML character entities.
Change special characters into HTML character entities.
(raw-string & xs)Converts one or more strings into an object that will not be escaped when used with the [[hiccup2.core/html]] macro.
Converts one or more strings into an object that will not be escaped when used with the [[hiccup2.core/html]] macro.
(raw-string? x)Returns true if x is a RawString created by raw-string.
Returns true if x is a RawString created by [[raw-string]].
(to-str x)Convert a value into a string.
Convert a value into a string.
(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"
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"(url-encode x)Turn a value into a URL-encoded string.
Turn a value into a URL-encoded string.
(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.
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 encoding & body)Sets a default encoding for URL encoding strings. Defaults to UTF-8.
Sets a default encoding for URL encoding strings. Defaults to UTF-8.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |