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

The remove template operator won't work with UTF8 characters

    XMLWordPrintable

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 ï

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no 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