Review main Abandoned

52012[BUGFIX] Prevent double encoding of default value TranslateViewHelper

Frans Saris CR 0 V 0 Easy +26 −1 updated 11/14/17, 18:27

Commit message

The output of the TranslateViewHelper is always escaped since the
changes introduces with #75575 also the default value gets escaped.
This results in double escaped output of the default value.

Example:
    `<f:translate key="widget.pagination.next">&raquo;</f:translate>`

This patch decodes all html entities of the default value to prevent
double encoding.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 811

  1. Frans Saris uploaded patch set 1 03/12/17, 15:13

  2. TYPO3com voted on patch set 1 V +1 03/12/17, 15:21 Completed build in 07m 29s on Sun, 12 Mar, 04:21 PM Test Summary: 56455 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9080

  3. Frans Saris commented on patch set 1 CR -1 V -1 03/12/17, 15:25

    same issue for `<f:translate key="foo"><p>hello world</p></f:translate>`
  4. Frans Saris uploaded patch set 2 03/12/17, 15:32

  5. TYPO3com voted on patch set 2 V -1 03/12/17, 15:40 Completed build in 08m 20s on Sun, 12 Mar, 04:40 PM Test Summary: 6 of 56470 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9082

  6. Frans Saris uploaded patch set 3 03/12/17, 15:57

  7. TYPO3com voted on patch set 3 V -1 03/12/17, 16:07 Completed build in 09m 20s on Sun, 12 Mar, 05:07 PM Test Summary: 6 of 56470 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9084

  8. Riccardo De Contardi commented on patch set 3 V +1 03/12/17, 22:20

    that seems to work testing both using "&laquo;" and putting html tag inside f:translate.
  9. Helmut Hummel commented on patch set 3 CR -1 03/12/17, 23:19

    TranslateViewHelper.php:151

    This cannot work. Neither the argument value, nor the children are escaped at this point. Escaping of the complete output is done instead. There is no way to influence that, except switching to $exscapeOutput = false.
  10. Frans Saris commented on patch set 3 CR -1 03/13/17, 17:46

    Yes me latest patch isn't the solution. I think we need to revert the original change...
  11. Frans Saris abandoned the change 11/14/17, 18:27

    so it seems not a lot of people run into this problem. And there is no easy fix. That's why I abandon this patch