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

Self closing tags become malformed when written to the header response

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1.0 CE GA1, 7.1.10 DXP GA1, 7.1.10 DXP FP1, 7.1.10 DXP FP2, 7.1.10 DXP FP3, 7.1.1 CE GA2, 7.1.10 DXP FP4, 7.1.10 DXP FP5, 7.1.10.1 SP1, 7.1.2 CE GA3, 7.1.10 DXP FP6, 7.1.10 DXP FP7, 7.1.10 DXP FP8
    • Fix Version/s: Master
    • Labels:
      None

      Description

      Problem Background

      When dispatching to JSPX for the HeaderResponse, the resulting markup contains self-closing XML tags. For example, given the following markup:

      header.jspx
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"></link>
      

      After compilation and dispatch, the resulting markup will look like the following:

      <link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
      

      Liferay Portal has a bug such that when certain self-closing <link/> and <meta/> tags are added to the head section, the tags become malformed as <link/></link> and <meta/></meta> respectively.

      Steps to Reproduce

      • Copy the attached WAR to the $LIFERAY_HOME/deploy folder and add the portlet named "LPS-XYZ" to the portal page.
      • Reload the page.
      • Click the "Test" button.

      Expected Results

      An popup displays "The test was successful."

      Actual Results

      The popup does not display and there is a stacktrace in the console log indicating that the XML could not be parsed because of malformed text <link ... /></link>.

        Attachments

          Activity

            People

            • Assignee:
              shuyang.zhou Shuyang Zhou
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Recent user:
              Michael Saechang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                28 weeks, 1 day ago

                Packages

                Version Package
                Master