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

<aui:icon /> taglib outputs label HTML markup even when nothing is passed

    Details

      Description

      <aui:icon /> taglib outputs label HTML markup even when nothing is passed. We should not ouput anything if there is no label.

      If no label is passed, <span class="taglib-icon-label">...</span> should not be output.

      Steps to reproduce:

      1. Get a latest ee-7.0.x bundle.
      2. Navigate to ./bundle/osgi/modules and try to modify the announcements view.jsp in com.liferay.announcements.web.jar/META-INF/resources/view.jsp
      3. Add <aui:icon /> at the last line in the view.jsp and save it.
      4. Start the bundle, add the Announcements portlet to the page.
      5. Inspect the page source, search for "<span class="taglib-icon-label"> </span>"

      Actual:

      <svg>...</svg>
      <span class="taglib-icon-label"></span>	
      

      Expected:

      <svg>...</svg>
      

        Attachments

          Activity

            People

            • Assignee:
              felix.zhang Felix Zhang
              Reporter:
              jonathan.mak Jonathan Mak
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 41 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP6
                7.0.0 DXP SP2
                7.0.3 CE GA4
                7.1.X
                Master