Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-5876

Apostrophes in project titles and metadata fields are rendering poorly

    Details

    • Sprint:
      1.7.5.2 Point release
    • Rank:
      0|ii1nlv:
    • Sprint:
      1.7.5.2 Point release

      Description

      It seems that project title (name) and label (secondary id) are being escaped on the back-end when saved. At least apostrophes are being converted to their HTML entity strings, when when escaped on the front-end when rendering double-escapes the string resulting in very ugly text. Actually, I'm not sure what's happening because these fields are escaped on the project report page as well as in the JSON returned from /data/projects/projectId, but not escaped in the input fields on the edit page.

        Issue Links

          Activity

          markflorida@wustl.edu Mark Florida created issue -
          markflorida@wustl.edu Mark Florida made changes -
          Field Original Value New Value
          Assignee Will Horton [ whorto01 ]
          markflorida@wustl.edu Mark Florida made changes -
          Hide
          markflorida@wustl.edu Mark Florida added a comment - - edited

          This seems to happen only with REST calls - and with all fields, including description. However, if the value is rendered through Velocity, as on the edit page ($!item.getStringProperty("xnat:projectData/name")), the apostrophes are not escaped and rendered properly (as apostrophes).

          Any ideas - Rick Herrick Mike McKay ? I noticed some string library changed from 'commons-lang3' to 'commons-text' a while back - would that do it?

          Show
          markflorida@wustl.edu Mark Florida added a comment - - edited This seems to happen only with REST calls - and with all fields, including description. However, if the value is rendered through Velocity, as on the edit page ( $!item.getStringProperty("xnat:projectData/name") ), the apostrophes are not escaped and rendered properly (as apostrophes). Any ideas - Rick Herrick Mike McKay ? I noticed some string library changed from 'commons-lang3' to 'commons-text' a while back - would that do it?
          markflorida@wustl.edu Mark Florida made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint 1.7.5-RC-1 [ 117 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked higher
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint 1.7.5-RC-1 [ 117 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint XXX [ 119 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked higher
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint XXX [ 119 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked lower
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint Defer [ 123 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked higher
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Fix Version/s 1.7.5 [ 13913 ]
          Fix Version/s 1.7.5.1 [ 14714 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint Defer [ 123 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked lower
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Assignee Rick Herrick [ rherri01 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint 1.7.5.1 - 01 [ 124 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Fix Version/s 1.7.5.1 [ 14714 ]
          Fix Version/s 1.7.6 [ 13912 ]
          hortonw@wustl.edu Will Horton made changes -
          Labels 1.7.5-known
          hortonw@wustl.edu Will Horton made changes -
          Summary Project 'name' and 'secondary_ID' fields double-escaped Apostrophes in project 'name' and 'secondary_ID' fields are rendering poorly
          hortonw@wustl.edu Will Horton made changes -
          Summary Apostrophes in project 'name' and 'secondary_ID' fields are rendering poorly Apostrophes in project metadata fields are rendering poorly
          hortonw@wustl.edu Will Horton made changes -
          Summary Apostrophes in project metadata fields are rendering poorly Apostrophes in project titles and metadata fields are rendering poorly
          Hide
          mfmckay@wustl.edu Mike McKay (Inactive) added a comment - - edited

          I am in the middle of fixing this. I just wanted to note here that parts of the previous comment are incorrect. For example, it is not only in REST calls, and $!item.getStringProperty("xnat:projectData/name") is rendering incorrectly (because it's wrapped in an escapeAll) on the project report page (as shown in the screenshot).

          Show
          mfmckay@wustl.edu Mike McKay (Inactive) added a comment - - edited I am in the middle of fixing this. I just wanted to note here that parts of the previous comment are incorrect. For example, it is not only in REST calls, and $!item.getStringProperty("xnat:projectData/name") is rendering incorrectly (because it's wrapped in an escapeAll) on the project report page (as shown in the screenshot).
          mfmckay@wustl.edu Mike McKay (Inactive) made changes -
          Assignee Rick Herrick [ rherri01 ] Mike McKay [ mmckay01 ]
          mfmckay@wustl.edu Mike McKay (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          mfmckay@wustl.edu Mike McKay (Inactive) made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          moore.c@wustl.edu Charlie Moore made changes -
          Link This issue is duplicated by TRIAGE-244 [ TRIAGE-244 ]
          moore.c@wustl.edu Charlie Moore made changes -
          Labels 1.7.5-known 1.7.5-known cnda-interest
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Affects Version/s 1.7.5.1 [ 14714 ]
          Labels 1.7.5-known cnda-interest 1.7.5-known cnda-interest fix-asap
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Fix Version/s 1.7.6 [ 13912 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint 1.7.6 - 01 [ 124 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked lower
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked lower
          mfmckay@wustl.edu Mike McKay (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          mfmckay@wustl.edu Mike McKay (Inactive) added a comment -

          The project XML and JSON are unchanged in 1.7.4 and 1.7.5. Mark thinks it should be a simple frontend fix to get it displaying like it did in 1.7.4.

          Show
          mfmckay@wustl.edu Mike McKay (Inactive) added a comment - The project XML and JSON are unchanged in 1.7.4 and 1.7.5. Mark thinks it should be a simple frontend fix to get it displaying like it did in 1.7.4.
          mfmckay@wustl.edu Mike McKay (Inactive) made changes -
          Assignee Mike McKay [ mmckay01 ] Mark Florida [ mflori01 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Sprint 1.7.5.2 Point release [ 135 ]
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Rank Ranked higher
          moore.stephen.m@wustl.edu Steve Moore made changes -
          Fix Version/s 1.7.5.2 [ 14722 ]
          Hide
          markflorida@wustl.edu Mark Florida added a comment -

          Resolved for project-related pages. Other pages will likely need to be addressed as well.

          Show
          markflorida@wustl.edu Mark Florida added a comment - Resolved for project-related pages. Other pages will likely need to be addressed as well.
          markflorida@wustl.edu Mark Florida made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          markflorida@wustl.edu Mark Florida made changes -
          Assignee Mark Florida [ mflori01 ] Charlie Moore [ cmoore01 ]
          moore.c@wustl.edu Charlie Moore made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          moore.c@wustl.edu Charlie Moore made changes -
          Link This issue relates to XNAT-6063 [ XNAT-6063 ]

            People

            • Assignee:
              moore.c@wustl.edu Charlie Moore
              Reporter:
              markflorida@wustl.edu Mark Florida
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile