Class Destinations

java.lang.Object
org.apache.juneau.commons.template.Destinations

public final class Destinations extends Object
Destination presets for TemplateResolver.Builder.destination(Destination).

Each preset pairs a value encoder (applied to resolved values, never to template text) with a StructureRenderer that encodes every item and cell itself. Only generic formats are offered; define a Destination for anything else.

  • HTML: for text nodes and quoted attribute values only; it does not make a URL attribute safe (use URL_COMPONENT and a scheme allowlist for href/src). Escapes & < > " '; lists, blocks and tables become ul, ol, blockquote and table elements.
  • MARKDOWN: backslash-escapes characters Markdown would interpret and flattens whitespace so a value cannot start a new block; lists, quotes and pipe tables. Bare URLs are not auto-linked (the : of :// and every . are escaped).
  • PLAIN_TEXT: drops control characters other than newline and tab; - , N. and > markers and column-aligned tables.
  • JSON_STRING: escapes for the inside of a JSON string literal.
  • URL_COMPONENT: percent-encodes for a URL path segment or query component.