Conformance Examples 0.1.0 — Transforms: transform-escape_once¶
escape_once-all-metacharacters¶
With no existing entities, encodes &, <, >, double-quote, and single-quote like escape. Uses {{{ }}} so the renderer does not re-escape the transform's output.
Template
Context
Output
escape_once-preserves-existing-entities¶
An ampersand already beginning a named or numeric entity is left untouched, while bare metacharacters are encoded.
Template
Context
Output
escape_once-bare-ampersand¶
An ampersand not followed by a valid entity is encoded.
Template
Context
Output
escape_once-idempotent-hex-entity¶
Applying escape_once to a string already containing its own ' output does not re-escape the entity's ampersand.
Template
Context
Output
Source fixture: transforms/transform-escape_once.json