WarUI

Default text escaping of cell values

GRID-A29-F01P0baselinePlanned

Every cell value renders as text through textContent-equivalent APIs, so markup-like strings show literally and never execute. This makes safety the default: developers must opt in to HTML rather than opt out of it.

Planned. This page shows the specification from issue #209. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Ten rows of user comments, including script tags, event-handler attributes, HTML entities, and unicode bidi override characters.

Expected behavior

All payloads display as literal text. The inspector shows only text nodes inside the cell element. No alert fires and no network request for 'x' is made. A valueFormatter output is escaped the same way as raw values.

Planned API surface

columns[].fieldcolumns[].valueFormatterrenderModeonCellRender

Acceptance criteria

  • Given a value containing '<script>', the cell DOM contains zero script elements. (pending)
  • Given a value containing an onerror attribute, no image element is created in the cell. (pending)
  • valueFormatter output is treated as text unless the column explicitly opts into trusted HTML. (pending)
  • Entity strings like '&lt;b&gt;' render literally as typed and are not double-decoded. (pending)
  • Bidi control characters are visually isolated so adjacent cells are not reordered. (pending)