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

Image thumbnail not shown on backend if alias contains quotes

    Details

    • Sprint:
      Castor Core S2, Castor Core S3

      Description

      Steps to reproduce:
      1. Configure site with urlalias_iri TransformationGroup ( in site.ini, [URLTranslator])
      2. Create a folder with quotes in name (for example under "Media" section)
      3. Add an image to this folder
      4. Make sure "thumbnail" is checked in table options for subitems.
      5. On the folder view, move mouse over the image icon, verify that the image thumbnail does not appears.
      Further notes:
      1. ezjscnode call html-encodes thumbnail_url :

        "thumbnail_url": "/var/.../folder"with"quotes/image/748-1-eng-GB/image_small.png"
        

      2. also variable url does not seem to be encoded in ezajaxsubitems_datatable.js , #L70,

      http://www.w3.org/TR/CSS2/syndata.html#value-def-uri

      Some characters appearing in an unquoted URI, such as parentheses, white space characters, single quotes (') and double quotes ("), must be escaped with a backslash so that the resulting URI value is a URI token: '\(', '\)'. 
      

        Issue Links

          Activity

          Show
          Joao Inacio (Inactive) added a comment - - edited PR: https://github.com/ezsystems/ezpublish-legacy/pull/1011
          Show
          Yannick Roger (Inactive) added a comment - Alternative PR: https://github.com/ezsystems/ezpublish-legacy/pull/1019
          Hide
          Gunnstein Lye added a comment -

          Merged [~yannick.roger@ez.no]'s alternative PR #1019 to
          master: https://github.com/ezsystems/ezpublish-legacy/commit/0455a8e8cf57b20594c9f76d98e2274541c81a3f

          Show
          Gunnstein Lye added a comment - Merged [~yannick.roger@ez.no] 's alternative PR #1019 to master: https://github.com/ezsystems/ezpublish-legacy/commit/0455a8e8cf57b20594c9f76d98e2274541c81a3f
          Hide
          Joao Inacio (Inactive) added a comment - - edited
          Note:

          The same thumbnail problem seems to happen also in eZOE popup ("Browse" tab) preview thumbnail (as far as I can tell it is the exact same issue), as well as with images in eZOE content itself.

          Show
          Joao Inacio (Inactive) added a comment - - edited Note: The same thumbnail problem seems to happen also in eZOE popup ("Browse" tab) preview thumbnail (as far as I can tell it is the exact same issue), as well as with images in eZOE content itself.
          Hide
          Paulo Nunes (Inactive) added a comment - - edited

          Hi,
          After applying the patches, and testing using the following examples:

          Folder name Example Result
          Without quotes News OK
          one single quote 'News OK
          one double quote "News OK
          two single quote 'News' Failed
          two double quote "News" OK
          one single and one double quote "News' OK

          The thumbnail still don't appear when we use single quote twice.

          Show
          Paulo Nunes (Inactive) added a comment - - edited Hi, After applying the patches, and testing using the following examples: Folder name Example Result Without quotes News OK one single quote 'News OK one double quote "News OK two single quote 'News' Failed two double quote "News" OK one single and one double quote "News' OK The thumbnail still don't appear when we use single quote twice.
          Show
          Damien Pobel (Inactive) added a comment - Additional PR: https://github.com/ezsystems/ezpublish-legacy/pull/1038
          Hide
          Damien Pobel (Inactive) added a comment - - edited
          Show
          Damien Pobel (Inactive) added a comment - - edited Additional patch: Fixed in ezpublish-legacy: master: http://github.com/ezsystems/ezpublish-legacy/commit/96aec36a08ca0d046b1c02244c2c2eb624a22baf
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved
          Tested on eZ Publish 4.7, 5.0, 5.1, 5.2, 5.3 and master

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved Tested on eZ Publish 4.7, 5.0, 5.1, 5.2, 5.3 and master

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  Agile