Liking cljdoc? Tell your friends :D

Changelog

This is a history of changes to montalivet.

0.1.5 - 2026-11-30

  • Added the :remove-empty option to clean, which also removes the elements left with no content after cleaning, such as the empty paragraphs of HTML exported from Word. An inline element holding only whitespace is unwrapped instead, so the words around it stay apart. Table cells are kept.
  • Added the :collapse-whitespace option to clean, which collapses whitespace the way a browser renders it. &nbsp; and <pre> are kept.
  • Added the :preset option to clean, with the :word preset for HTML exported from Microsoft Word: {:remove-tags [:span] :remove-empty true :collapse-whitespace true}.

0.1.4 - 2026-11-19

  • Added valid?, which tells whether an HTML string contains nothing that clean would remove. It takes the safelist options of clean.
  • Added unescape-html, which decodes HTML entities, with the :in-attribute option.
  • Added abs-url, which returns an attribute as an absolute URL, or nil when it cannot be resolved.
  • Added base-uri, which returns the base URI of a document or element, or nil when it has none.

0.1.3 - 2026-11-11

  • parse now accepts a java.io.File, a java.nio.file.Path or a java.io.InputStream as well as a string. Any other input throws an ex-info.
  • Added the :base-uri and :charset options to parse.
  • Added parse-fragment, which parses a string as a fragment of a document body.
  • Added version, which returns the version of montalivet, and jsoup-version, which returns the version of jsoup found on the classpath.
  • Updated jsoup from 1.23.2 to 1.24.1.

0.1.2 - 2026-10-06

  • Added select and select-one, which find elements of a document with a CSS selector.
  • Added text, attr, attrs and outer-html to read the matched elements.

0.1.1 - 2026-10-05

  • Added clean, which removes unsafe markup from an HTML string using a jsoup safelist. Options: :safelist (:none, :simple-text, :basic, :basic-with-images, :relaxed), :add-tags, :remove-tags, :add-attributes, :remove-attributes, :base-uri, :preserve-relative-links, :pretty-print and :escape-mode.
  • Updated jsoup from 1.18.1 to 1.23.2. The output of clean can differ between jsoup versions. For example, the rel="nofollow" attribute is no longer added to links that keep a valid href.

0.1.0 - 2026-10-02

  • First release: a Clojure wrapper around jsoup.
  • Added parse, which parses an HTML string into a jsoup Document, with the :pretty-print and :escape-mode (:base, :xhtml, :extended) options.
  • Added body-html, which returns the inner HTML of a document body.
  • Added escape-html, which escapes a string for use as HTML text.

Can you improve this documentation? These fine people already did:
Dan & Dan Loaiza
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close