---
title: "Important: #70867 - XLIFF whitespace handling now respects xml:space"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:important-70867-1737100000"
source: "Changelog/14.2/Important-70867-XLIFFWhitespaceHandlingNowRespectsXmlSpaceAttribute.rst"
typo3-version: "14.2"
typo3-major: 14
type: "important"
issue: 70867
forge: "https://forge.typo3.org/issues/70867"
tags: ["Backend", "Localization", "XLF"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Important: #70867 - XLIFF whitespace handling now respects xml:space {#important-70867-1737100000}

See [forge#70867](https://forge.typo3.org/issues/70867)

## Description {#description}

TYPO3's XLIFF parser now respects the `xml:space` attribute
according to the XML specification
([https://www.w3.org/TR/xml/#sec-white-space](https://www.w3.org/TR/xml/#sec-white-space)).

This affects how whitespace (spaces, tabs, newlines) in translation strings
is handled.

Without `xml:space="preserve"` (default behavior):

Multiple consecutive whitespace characters (spaces, tabs, newlines) are
collapsed into a single space, and leading/trailing whitespace is trimmed.

Example XLIFF source:

```xml
<trans-unit id="my.label">
  <source>This is a
    multi-line
    string.</source>
</trans-unit>
```

Before: The string contained literal newlines and indentation.
After: The string becomes `"This is a multi-line string."`

With `xml:space="preserve"`:

Whitespace is kept exactly as written in the XLIFF file.

```xml
<trans-unit id="my.label" xml:space="preserve">
  <source>This is a
    multi-line
    string.</source>
</trans-unit>
```

The string remains `"This is a\n        multi-line\n        string."`

## Impact {#impact}

Translation strings that previously contained unintended whitespace (from
formatting in the XLIFF file) are now correctly displayed without extra spaces
or line breaks.

If you need preserved whitespace in a translation string,
add the `xml:space="preserve"` attribute to the `<trans-unit>`
element (XLIFF 1.2) or `<segment>` element (XLIFF 2.0).

This change affects both XLIFF 1.2 and XLIFF 2.0/2.1 formats.
