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

        Gunnstein Lye logged work - 15/May/17 2:30 PM
        • Time Spent:
          30 minutes
           

          .

        Gunnstein Lye logged work - 26/May/17 3:00 PM
        • Time Spent:
          30 minutes
           

          .

          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