Skip to content

[Discover][Field Formatter] Truncated string format strips HTML/XML tags from field values #257948

@alstolten

Description

@alstolten

Kibana version:
9.3.1

Describe the bug:

When the Truncated string field format is applied to a field containing XML or HTML-like content, all angle-bracket tags (e.g. <element>, <ns:element>) are stripped from the rendered output in Discover. Only the text content between tags is displayed.

This is a regression introduced in 9.3.1 by #251892, which was backported to the 9.3 branch via 60e4862.

The issue does not occur on 9.3.0.

Steps to reproduce:

  1. Index document:
PUT test-xml-truncate/_doc/1
{
  "@timestamp": "2026-03-16T10:00:00Z",
  "payload": "<root><item><name>Hello World</name><value>12345</value></item></root>"
}
  1. Create dataview
  2. Modify field in dataview to truncate
Image

Expected behavior:

Truncate the field, with previous versions.

Screenshots (if relevant):
see above

Provide logs and/or server output (if relevant):

Any additional context:

Metadata

Metadata

Assignees

Labels

Feature:DiscoverDiscover ApplicationTeam:DataDiscoveryDiscover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//bugFixes for quality problems that affect the customer experienceimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.loe:smallSmall Level of Effortregression

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions