Files
odfstudio/filter/source
Ujjawal Kumar cb2bc2ba0e WordML import: fix huge recursion depth in replace-spaces
Bug document: fdo67478-1.doc

The replace-spaces template consumed one pair of spaces per recursion
level. WordML documents with very long space runs (e.g. 61000
consecutive spaces) exceeded libxslt's 3000 depth limit, causing an
import error.

Consume the entire consecutive space run in a single call by using
translate() to find the first non-space character, counting all leading
spaces at once, and emitting a single <text:s text:c="N"/> element.
Recursion depth is now bounded by the number of separate space runs,
not the total number of spaces.

Change-Id: Ifb11a61a2e89274684e1d6d38920c8792598fa43
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/62
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7ba970bce9e1200e5712afe76ec3a85056be9263)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204666
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-02 17:46:23 +02:00
..
2026-03-27 08:39:40 +01:00
2024-05-08 11:15:29 +02:00
2026-04-25 11:00:04 +02:00
2026-04-30 08:54:45 +02:00