Review main Merged

47644[TASK] Streamline escaping for ViewHelpers of all sysexts

Benni Mack CR +2 V +2 Hard +289 −50 updated 04/20/16, 15:51

Commit message

The Core does not strictly use $escapeChildren and
$escapeOutput as properly introduced by Fluid Standalone in 8.0.

This results in some weird HTML output when using the inline syntax
currently.

Since $escapeOutput and $escapeChildren is active by default,
some ViewHelpers even do HSC on their own (= twice) even if not
needed.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Nicole Hummel +1
  • Verified V +2
    • Helmut Hummel +2
    • Nicole Hummel +1

Issues 1

Files 44

Show 24 more files

Review log 28

Show 3 earlier messages
  1. Benni Mack uploaded patch set 1 04/13/16, 13:53

  2. Wouter Wolters commented on patch set 1 04/13/16, 14:02

    Great Benni, found a few things which I commented.

    ArrayElementViewHelper.php:25

    todo?

    CshViewHelper.php:48

    whitespace

    TableListViewHelper.php:48

    wrong comment? same below
  3. Benni Mack commented on patch set 2 04/14/16, 04:50

    Published edit on patch set 1.
  1. Benni Mack updated the commit message in patch set 3 04/14/16, 04:51

  2. Benni Mack uploaded patch set 4 04/14/16, 11:21

  3. Benni Mack updated the commit message in patch set 5 04/14/16, 12:46

  4. Nicole Hummel commented on patch set 5 04/15/16, 09:52

    Just a style question: shouldn't there be an empty line between comment and type annotation. And without the full stop at the end?
  5. Nicole Hummel commented on patch set 5 CR -1 04/18/16, 17:29

    IssueCommandViewHelper.php:77

    Remove hsc here and the escapeOutput above. No need to escape the output.

    InfoboxViewHelper.php:65

    Comment doesn't make sense here. Better to say that the children may contain html which should be output unescaped.

    TableListViewHelper.php:57

    I don't see the reason for turning off escaping of child content
  6. Helmut Hummel commented on patch set 5 CR -2 04/18/16, 19:08

    Working on it right now
  7. Helmut Hummel uploaded patch set 6 04/18/16, 20:57

  8. Helmut Hummel commented on patch set 5 04/18/16, 20:57

    IssueCommandViewHelper.php:77 Reply

    Done

    JsonEncodeViewHelper.php:29

    this statement is wrong! It highly depends on the context where the vh is used in, and what we want as default behavior in general. Imho all vhs should escape by default (unless they output HTML of course). Users (template writers) can still influence this behavior!

    TranslateViewHelper.php:75

    nope. we should streamline this and deprecate the argument
  9. Helmut Hummel voted on patch set 6 CR 0 04/18/16, 20:58

  10. Helmut Hummel commented on patch set 6 CR -1 04/18/16, 20:58

    TranslateViewHelper.php:121

    we need a deprecation rst now still
  11. Nicole Hummel commented on patch set 6 CR -1 04/18/16, 22:43

    Folder.php:86

    This doesn't belong to the patch.

    LocalizationUtility.php:81

    ?

    InfoboxViewHelper.php:66

    Please add another new line.

    TableListViewHelper.php:55

    Still the question why this is needed?
  12. Helmut Hummel commented on patch set 6 04/19/16, 12:41

    Folder.php:86 Reply

    Done

    LocalizationUtility.php:81 Reply

    Done

    InfoboxViewHelper.php:66 Reply

    this needs to be removed completely. I missed that yesterday

    TableListViewHelper.php:55 Reply

    good catch. no rendered children at all here, so we can remove that safely

    EscapeChildrenRenderingStandaloneTest.php:18

    removed this change as well
  13. Helmut Hummel uploaded patch set 7 04/19/16, 12:52

  14. Helmut Hummel uploaded patch set 8 04/19/16, 13:04

  15. Nicole Hummel voted on patch set 8 CR +1 V +1 04/19/16, 13:24

  16. Nicole Hummel commented on patch set 8 V -1 04/19/16, 13:26

    Failing unit test
  17. Nicole Hummel uploaded patch set 9 04/19/16, 13:28

  18. Nicole Hummel voted on patch set 9 CR +1 V +1 04/19/16, 13:40

  19. Helmut Hummel uploaded patch set 10 04/19/16, 14:08

  20. Nicole Hummel commented on patch set 10 CR -1 04/20/16, 13:51

    InstallFromTer.json:2

    Why is this needed if the escaping for the viewhelper is turned off?

    ShortcutViewHelper.php:51

    superfluous space

    BytesViewHelper.php:52

    The value is excepted to be a number. Why is escaping switched off?

    CurrencyViewHelper.php:56

    Value has to be a float. Why do we switch off the escaping here?
  21. Helmut Hummel uploaded patch set 11 04/20/16, 15:45

  22. Helmut Hummel commented on patch set 10 04/20/16, 15:47

    InstallFromTer.json:2 Reply

    output encoding is on, which is undesired here

    ShortcutViewHelper.php:51 Reply

    Done

    BytesViewHelper.php:52 Reply

    same as in currency vh, this can/should be off as output encoding is already on.
  23. Helmut Hummel voted on patch set 11 CR +2 V +2 04/20/16, 15:47

  24. Nicole Hummel voted on patch set 11 CR +1 V +1 04/20/16, 15:48

  25. Gerrit merged patch set 11 04/20/16, 15:51