Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress

97458[TASK] Update htmlnano to v3 and litnano to v1.1

Benjamin Franzke CR 0 V -1 Hard +294 −186 updated 11/18/26, 10:27

Commit message

htmlnano < 3.4.1 is affected by GHSA-jh9m-x59h-4746 [1], JSON
script minification decodes `\u003C` escapes and allows payloads
to break out of the script element.

The advisory has been published by the maintainers on 2026-09-03,
but it has not been reviewed for the GitHub advisory database yet
and is therefore not reported by `npm audit`. The vulnerable
version is updated nonetheless.

htmlnano is used by litnano to minify lit templates during the
build. litnano is raised to v1.1, which keeps optional end tags
that are omitted by default since htmlnano 3.6.0.

htmlnano 3.6.0 also fixed the whitespace handling around custom
and other inline elements [2]. htmlnano 2 treated custom elements
like block elements and removed whitespace that is rendered by the
browser, e.g. between an icon and its label. The minified templates
now render the same as their source. Additionally, character
references are decoded (e.g. `&hellip;` to `…`).

Executed commands:

  npm install --save-dev htmlnano@^3.6.1 litnano@^1.1.0
  npm run build

[1] https://github.com/maltsev/htmlnano/security/advisories/GHSA-jh9m-x59h-4746
[2] https://github.com/maltsev/htmlnano/releases/tag/3.6.0

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/58/97458/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/58/97458/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • Benjamin Franzke -1

Relation chain 2

  1. 97458 [TASK] Update htmlnano to v3 and litnano to v1.1 This change

  2. main 97452[TASK] Update insecure npm dependencies This change is based on it Merged Benjamin Franzke CR +2 V +2 → 14.3, 13.4 Hard +223 −210

    The chain has patch set 3 of 4, the changes above it need a rebase.

Issues 1

Files 69

Show 49 more files

Review log 6

  1. Benjamin Franzke uploaded patch set 1 11/09/26, 17:55

  2. Benjamin Franzke marked it work in progress 11/09/26, 17:56

  3. Benjamin Franzke uploaded patch set 2 11/09/26, 18:01

  4. Benjamin Franzke marked it ready for review 11/09/26, 19:07

  5. Benjamin Franzke marked it work in progress 11/09/26, 19:07

  6. Benjamin Franzke commented on patch set 2 V -1 11/18/26, 10:27

    Unresolved

    This patch is WIP because whitespace is effectively added between components (because htmlnano can not know if they are inline or block components), which causes spacings to change. htmlnano became "more" correct with v3, to ensure the rending is equal to a non-minified variant, but given that our spacings are currently "optimized" for the minified variant, we need to take account for that. I already asked claude to make visual regression tests, but that was time consuming, and I couldn't finish that until now.