Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27360

The remove template operator won't work with UTF8 characters

    Details

      Description

      Since the remove template operator is based on the PHP function substr, which cannot handle utf8 strings, the operator will return weird � characters if used with special chars.

      Please check custom proposed fix:
      https://github.com/mugoweb/ezpublish-legacy/pull/57 Edit: Now https://github.com/ezsystems/ezpublish-legacy/pull/1298

      Steps to reproduce.
      • Edit a legacy tpl template, and add the following code to it:

        {'fipsï'|remove( 4,1 )}

      • Clear the caches, and open the respective content in the frontend
      • Confirm the code will return �, instead ï

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        1m 5s 1 eduardo.fernandes@ez.no 12/May/17 4:17 PM
        Confirmed Confirmed InputQ InputQ
        15s 1 eduardo.fernandes@ez.no 12/May/17 4:17 PM
        QA QA InputQ InputQ
        1d 32m 1 rui.silva@ez.no 24/May/17 4:26 PM
        InputQ InputQ Development Development
        4d 21h 43m 2 Gunnstein Lye 26/May/17 3:56 PM
        Development Development Development Review Development Review
        9s 2 Gunnstein Lye 26/May/17 3:56 PM
        Development Review Development Review Documentation Review done Documentation Review done
        8d 1h 8m 2 Gunnstein Lye 26/May/17 3:56 PM
        Documentation Review done Documentation Review done QA QA
        2d 17h 33m 2 rui.silva@ez.no 29/May/17 9:16 AM
        QA QA Closed Closed
        15s 1 rui.silva@ez.no 29/May/17 9:16 AM

          People

          • Assignee:
            Unassigned
            Reporter:
            Eduardo Fernandes (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour
              1h