88508[BUGFIX] Enable inline SVG support in typo3/html-sanitizer
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Benjamin Franzke +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Oliver Hader +2
- Benjamin Franzke +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 3
Review log 2534
Show 69 earlier messages
-
Oliver Hader uploaded patch set 1 03/06/25, 11:37
-
Oliver Hader uploaded patch set 2 03/06/25, 11:38
-
Oliver Hader uploaded patch set 3 03/06/25, 11:47
-
core-ci voted on patch set 1 V -1 03/06/25, 11:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75213
-
core-ci voted on patch set 2 V -1 03/06/25, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75214
-
core-ci voted on patch set 3 V -1 03/06/25, 11:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75215
-
Oliver Hader uploaded patch set 4
V -103/06/25, 12:02 -
Jasmina Ließmann commented on patch set 3 CR +1 V +1 03/06/25, 12:03
Works, thank you! :) The output of tests is as follows: ``` <p>Lorem ipsum dolor <a href="/">Link internal<span class="icon"><?xml version="1.0" encoding="UTF-8"?> <svg class="icon__svg" role="img" aria-hidden="true"> <use href="#icon" /> </svg> </span></a></p> ``` I'm wondering whether it might be possible to filter out the comment `<?xml version="1.0" encoding="UTF-8"?>` and the subsequent line break? Because there could be quite a lot of comments. If not, it's also okay. -
Jasmina Ließmann commented on patch set 4 V +1 03/06/25, 12:05
Reply
The latest patch sets have solved both of my issues.
-
core-ci voted on patch set 4 V +1 03/06/25, 12:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75216
-
Oliver Hader commented on patch set 4 03/06/25, 12:08
Reply
I've adjusted that with the recent patch-sets - the XML prolog is not output anymore. The inline SVG used in the backend login view, is passed through a custom cleanup process in `LoginLogoViewHelper`. -
Oliver Hader commented on patch set 4 03/06/25, 12:09
Reply
Done -
Oliver Hader updated the commit message in patch set 5
V +103/06/25, 14:36 -
Oliver Hader updated the commit message in patch set 6 03/06/25, 14:37
-
Simon Schaufelberger commented on patch set 6 03/06/25, 14:42
DefaultSanitizerBuilderTest.php:172this line doesn't look right. The first svg tag is self closing and the second one is closing a non opened tag. -
core-ci voted on patch set 5 V +1 03/06/25, 14:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75225
-
core-ci voted on patch set 6 V +1 03/06/25, 14:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75226
-
Oliver Hader commented on patch set 6 03/06/25, 21:34
DefaultSanitizerBuilderTest.php:172ReplyThx & Good catch. I did not spot this earlier... The problem is located in Masterminds HTML Parser, when sanitizing the nodes. I've just created a fix there, see https://github.com/Masterminds/html5-php/pull/259 -
Oliver Hader uploaded patch set 7
V +103/06/25, 21:50 -
Oliver Hader commented on patch set 7 03/06/25, 21:52
DefaultSanitizerBuilderTest.php:172ReplyI opted for removing empty svg nodes, since a release in the upstream package still might take some time. -
core-ci voted on patch set 7 V -1 03/06/25, 21:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75251
-
Benjamin Franzke commented on patch set 7 03/07/25, 08:15
DefaultSanitizerBuilder.php:82It would be cool to avoid save-parse-save here, and directly hand over the `DOMNode` to the svg sanitizer. I know svg sanitizer does not allow that directly, but it is possible (when we allow ourselves to extend the svg sanitizer class). Pushed a demo here, what do you think? > 88524: [WIP] demo svg sanitize without save-load-save | https://review.typo3.org/c/Packages/TYPO3.CMS/+/88524 -
Oliver Hader uploaded patch set 8
V -103/07/25, 08:30 -
core-ci voted on patch set 8 V +1 03/07/25, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75277
-
Oliver Hader commented on patch set 8 03/07/25, 08:41
DefaultSanitizerBuilder.php:82ReplyI think, that functionality should be part of the SVG sanitizer directly - instead of copy-pasting sanitization logic from SVG sanitizer on our side. -
Jasmina Ließmann commented on patch set 8 07/15/25, 12:11
DefaultSanitizerBuilder.php:82ReplyHas there been a decision on this yet? It would be great if the patch could continue 😊 -
Oliver Hader uploaded patch set 9
V +107/25/25, 06:18 -
Oliver Hader commented on patch set 9 07/25/25, 06:20
DefaultSanitizerBuilder.php:82ReplyI merged Ben's adjustments into this change, since it's working solution and is more efficient than my first approach. -
core-ci voted on patch set 9 V +1 07/25/25, 06:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82300
-
Benjamin Franzke voted on patch set 9 CR +1 V +1 07/25/25, 06:34
-
Simon Schaufelberger voted on patch set 9 CR +1 V +1 07/25/25, 08:54
-
Simon Schaufelberger commented on patch set 9 07/25/25, 10:16
DefaultSanitizerBuilderTest.php:172ReplyIt has finally been released! -
Oliver Hader voted on patch set 9 CR +2 V +2 07/26/25, 08:22
-
Oliver Hader merged patch set 10 07/26/25, 08:22