Class RawHtml

java.lang.Object
io.mindspice.simplypages.components.RawHtml
All Implemented Interfaces:
Component

public class RawHtml extends Object implements Component
Renders trusted HTML without escaping.

Security boundary: content passed here is emitted verbatim. Use only for trusted, pre-sanitized HTML.

Immutable and thread-safe after construction.

  • Constructor Details

    • RawHtml

      public RawHtml(String html)
      Creates a raw HTML component.
      Parameters:
      html - trusted HTML fragment; null is normalized to empty string
  • Method Details

    • create

      public static RawHtml create(String html)
      Factory for trusted raw HTML.
      Parameters:
      html - trusted HTML fragment
      Returns:
      new raw HTML component
    • render

      public String render(RenderContext context)
      Returns the stored HTML verbatim.
      Specified by:
      render in interface Component
      Parameters:
      context - context used for slot resolution and render policy
      Returns:
      unescaped HTML