Review 9.5 Merged

69856[TASK] Backport SecurityUtility.stripHtml()

Andreas Kienast CR +2 V +2 Easy +6 −1 updated 07/15/21, 08:35

Commit message

Originally introduced with #93453, this patch backports the method
`stripHtml()` from the `SecurityUtility` TypeScript module for easier
backports of patches using this method.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2
    • core-ci +1 CI

Issues 2

Files 2

Review log 1114

  1. Andreas Kienast uploaded patch set 1 07/14/21, 18:40

  2. Andreas Kienast uploaded patch set 2 07/14/21, 18:41

  3. core-ci voted on patch set 1 V -1 07/14/21, 18:54 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13334

  4. core-ci voted on patch set 2 V +1 07/14/21, 18:59 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13335

  5. Andreas Kienast commented on patch set 2 07/14/21, 19:01

    SecurityUtility.ts:74

    This one must be different to https://review.typo3.org/c/Packages/TYPO3.CMS/+/69855, because we still use PhantomJS in v9 which is old and cold and ugly. Long story short: PhantomJS cannot handle a DOMParser with text/html (or any other DOM stuff), thus we need this not so beautiful solution.
  6. Anja Leichsenring voted on patch set 2 V +1 CR +1 07/14/21, 19:10

  7. Oliver Hader commented on patch set 2 CR -1 07/15/21, 06:50

    SecurityUtility.ts:74 Reply

    We only use PhantomJS for testing, don't we? DOMParser was available in Internet Explorer 10 (https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#browser_compatibility)...
  8. Andreas Kienast commented on patch set 2 07/15/21, 06:55

    SecurityUtility.ts:74 Reply

    Yes, we use PhantomJS only. The issue is that PhantomJS is in a pretty bad shape and doesn't support DOMParser('foo', 'text/html'), the text/html thing is the crucial part.
  9. Andreas Kienast uploaded patch set 3 07/15/21, 07:23

  10. core-ci voted on patch set 3 V +1 07/15/21, 07:34 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13350

  11. Oliver Hader commented on patch set 3 07/15/21, 08:34

    JavaScript test intentionally skipped, due to missing support in (out-dated) PhantomJS version for `DOMParser`.
  12. Oliver Hader voted on patch set 3 V +2 CR +2 07/15/21, 08:34

  13. Oliver Hader commented on patch set 3 07/15/21, 08:35

    SecurityUtility.ts:74 Reply

    Done
  14. Oliver Hader merged patch set 4 07/15/21, 08:35