Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-4207

possible "escape" inconsistence with user fullname

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Completed
    • Affects Version/s: 6.0.0 Preview
    • Fix Version/s: 6.0.1 RC
    • Component/s: User Management
    • Labels:
      None
    • Liferay Contributor's Agreement:
      Accept

      Description

      We have found an annoying behavior with user fullname escaping.

      "User.getFullName()" calls "ContactConstants.getFullName()". This function ends with

      return HtmlUtil.escape(sb.toString());

      For the user with
      firstName = Claudio
      lastName = Dall'Antonia

      fullName will be "Claudio Dall'Antonia".

      GroupImpl.java has getDescriptiveName() method. This method return:

      • organization.getName() when group is "organization group"
      • layout.getName() when group is a "scope group"
      • group.getName() when group is a "community"
      • user.getFullName() when group is a "user group"

      except "user.getFullName()" all values are unescaped.

      So, into the jsp, when you write "HtmlUtil.escape(group.getDescriptiveName()":

      • an organization named "Bottega dell'Arrotino" become "Bottega dell'Arrotino" and shown correctly
      • then user named "Claudio Dall'Antonia" become "Claudio Dall&#39Antonia" and shown badly

      I suggest to alter group.getDescriptiveName to return always an escaped value

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benson.lau Benson Lau (Inactive)
              Reporter:
              maumar Mauro Mariuzzo
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                10 years, 42 weeks, 2 days ago

                  Packages

                  Version Package
                  6.0.1 RC