Portal Community

Minimal Example

{
  "id": "privacy-notice",
  "type": "html",
  "order": 1,
  "width": "full",
  "description": "<p>By submitting this form you agree to our <a href='https://example.com/privacy'>Privacy Policy</a>.</p>"
}

Content Source: the description Field

Like the label control, the html control uses the description field as its content. The content is the raw HTML string to render:

{
  "id": "terms-block",
  "type": "html",
  "description": "<h3>Terms of Use</h3><p>These terms govern your use of this service. Please read carefully before proceeding.</p><ul><li>You must be 18 years or older</li><li>Your data will be stored securely</li><li>You may withdraw consent at any time</li></ul>"
}

Allowed HTML Tags

The sanitiser whitelists 17 HTML tags. All other tags are stripped before rendering:

CategoryAllowed Tags
Text structurep, br, hr, div, span
Headingsh1, h2, h3, h4, h5, h6
Inline formattingstrong, em, u, code
Listsul, ol, li
Linksa (href, target, rel only)
Blocksblockquote, pre
Mediaimg (src, alt, width, height only)

Allowed Attributes

Only safe attributes are preserved. All event attributes (onclick, onload, etc.) are stripped regardless of which tag they appear on:

TagAllowed Attributes
ahref, target, rel
imgsrc, alt, width, height
* (all)class, id (stripped of dangerous patterns)
styleStripped entirely (inline styles are blocked)
Event handlersStripped entirely (onclick, onload, etc.)

Settings Reference

SettingTypeDefaultDescription
sanitizebooleantrueMust always be true. Cannot be disabled.
paddingnone | sm | md | lgnoneInner padding around the rendered HTML block
backgroundbooleanfalseRender on a card background with border

Rich Formatted Notice

{
  "id": "eligibility-notice",
  "type": "html",
  "width": "full",
  "order": 1,
  "settings": {
    "background": true,
    "padding": "md"
  },
  "description": "<h3>Eligibility Requirements</h3><p>To qualify for this programme you must meet <strong>all</strong> of the following criteria:</p><ul><li>Resident of an eligible jurisdiction</li><li>Annual income below $75,000</li><li>Not currently enrolled in a competing scheme</li></ul><p>If you are unsure of your eligibility, <a href='https://example.com/check' target='_blank'>use our eligibility checker</a> before proceeding.</p>"
}

Code Block Display

Use <pre><code> for displaying technical content such as API keys, configuration snippets, or example values:

{
  "id": "api-example",
  "type": "html",
  "description": "<p>Use the following endpoint for testing:</p><pre><code>POST https://api.example.com/v1/submit\nContent-Type: application/json\nAuthorization: Bearer YOUR_TOKEN</code></pre>"
}

Conditional HTML Blocks

{
  "id": "high-risk-notice",
  "type": "html",
  "description": "<p><strong>High Risk Transaction</strong></p><p>This transaction has been flagged for additional review. A compliance officer will contact you within 24 hours.</p>",
  "settings": { "background": true, "padding": "md" },
  "visibilityRule": "values['risk-score'] > 80"
}
Never Render User-Provided HTML The html control is for <em>form author</em>-provided content only. Never use it to render HTML that comes from user input or an API response that contains user-provided data. Even with sanitisation, rendering user-provided HTML is a security risk. For user data, use a text or textarea control in view mode.

Full Security Details

See HTML Control Security for the complete 6-layer XSS prevention model including DOMPurify configuration, custom sanitiser hooks, CSP headers, and the full list of blocked attack vectors.