Review 13.4 Work in progress

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

Benjamin Franzke CR 0 V 0 Hard +264 −156 updated 11/09/26, 18:02

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 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/97463/1 && git checkout FETCH_HEAD
Cherry-pick onto 13.4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/97463/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote

Relation chain 2

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

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

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

Issues 1

Files 39

Show 19 more files

Review log 2

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

  2. Benjamin Franzke marked it work in progress 11/09/26, 18:02