70457[FEATURE] Introduce explicit f:sanitize.html view-helper
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Wouter Wolters +1
-
Verified V +2 Done
- Benni Mack +2
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-94825-SanitizeHtmlFluidViewHelper.rstnew+68 −0
- typo3/sysext/core/Tests/Functional/Html/DefaultSanitizerBuilderTest.php+6 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Sanitize/HtmlViewHelper.phpnew+110 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Sanitize/HtmlViewHelperTest.phpnew+63 −0
Review log 2336
Show 811 earlier messages
-
Oliver Hader uploaded patch set 1 08/11/21, 20:34
-
Oliver Hader updated the commit message in patch set 2 08/11/21, 20:39
-
core-ci voted on patch set 1 V -1 08/11/21, 20:48 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14639
-
Oliver Hader updated the commit message in patch set 3 08/11/21, 20:49
-
core-ci voted on patch set 2 V -1 08/11/21, 20:50 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14640
-
Oliver Hader commented on patch set 3 08/11/21, 20:58
Just got feedback via Slack, it should probably named `f:format.sanitizeHtml`... -
core-ci voted on patch set 3 V -1 08/11/21, 21:07 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14641
-
Oliver Hader commented on patch set 3 CR -1 08/12/21, 13:53
on it -
Benni Mack commented on patch set 3 08/12/21, 13:56
Reply
sorry, I'm on it too! -
Oliver Hader uploaded patch set 4 08/12/21, 14:05
-
Claus Due commented on patch set 4 08/12/21, 14:35
HtmlSanitizeViewHelper.php:96$conf is undefined, did you mean to use $arguments?HtmlSanitizeViewHelper.php:102This line is probably redundant since $build is already passed as argument and is always a string.
-
core-ci voted on patch set 4 V +1 08/12/21, 14:36 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14750
-
Benni Mack uploaded patch set 5 08/12/21, 15:15
-
core-ci voted on patch set 5 V -1 08/12/21, 15:38 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14778
-
Oliver Hader commented on patch set 5 08/12/21, 15:41
HtmlSanitizeViewHelper.php:96ReplyAckHtmlSanitizeViewHelper.php:102ReplyAck -
core-ci commented on patch set 5 08/12/21, 15:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14778
-
Oliver Hader rebased onto patch set 6 08/12/21, 15:50
-
core-ci voted on patch set 6 V -1 08/12/21, 16:15 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14795
-
core-ci commented on patch set 6 08/12/21, 16:28 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14795
-
Oliver Hader rebased onto patch set 7 08/12/21, 20:58
-
core-ci voted on patch set 7 V +1 08/12/21, 21:21 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14857
-
Mathias Brodala commented on patch set 7 08/13/21, 06:48
I'd vote for renaming it to `f:sanitize.html`. The current name sounds like works like `f:format.html` + sanitation. -
Benni Mack commented on patch set 8 08/13/21, 07:14
Published edit on patch set 7. -
core-ci voted on patch set 8 V -1 08/13/21, 07:32 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14885
-
Claus Due commented on patch set 8 08/13/21, 07:58
I'm wondering if this patch and https://review.typo3.org/c/Packages/TYPO3.CMS/+/70404 are kind of doing the same thing, in which case it could make sense to adjust the other patch to allow `f:format.html` to define the sanitizer it wants to use - instead of adding this new ViewHelper. Currently the other patch implies a usage of `f:format.html` like: <f:format.html htmlSanitize="1">{html}</f:format.html> But we could instead make it accept the same type of `build` (named sanitizer) argument that this patch provides: <f:format.html sanitizer="default">{html}</f:format.html> In essence, argument `sanitizer` on `f:format.html` would work like the `build` argument on this proposed `f:format.htmlSanitize` ViewHelper. If you then pass the `sanitizer` argument when using `f:format.html` it could take priority over the `parseFunc` behavior. We could then also replace the current FE simulation behavior of `f:format.html` with this new Sanitizer implementation, so that if a BE request is detected then `parseFunc` wouldn't trigger at all - instead it would go directly through the Sanitizer (either the one you passed as `sanitizer` argument, or a fallback e.g. `default`). -
Oliver Hader commented on patch set 8 08/13/21, 08:04
Reply
The look similar, but actually are different (see description and RST file). The main difference is, that `<f:format.html>` ALWAYS calls `ContentObjectRenderer::parseFunc` - which does NOT happen with this change for new `<f:format.htmlSanitize>`. -
Oliver Hader commented on patch set 8 08/13/21, 08:05
Reply
I like the idea, thx -
core-ci commented on patch set 8 08/13/21, 08:07 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14885
-
Oliver Hader uploaded patch set 9 08/13/21, 09:05
-
Oliver Hader updated the commit message in patch set 10 08/13/21, 09:05
-
core-ci voted on patch set 9 V +1 08/13/21, 09:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14901
-
core-ci voted on patch set 10 V +1 08/13/21, 09:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14903
-
Benni Mack voted on patch set 10 V +1 CR +1 08/13/21, 14:31
-
Wouter Wolters voted on patch set 10 CR +1 08/13/21, 15:34
-
Benni Mack voted on patch set 10 V +2 CR +2 08/13/21, 19:58
-
Benni Mack merged patch set 11 08/13/21, 19:58