MyFaces Core
  1. MyFaces Core
  2. MYFACES-3298

h:outputText incorectly renders an extra <span>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.0.9, 2.1.3
    • Component/s: None
    • Labels:
      None

      Description

      The h:outputText seems to incorectly render a <span> element, even though no id/style/styleClass attribute is specified (as specified in http://myfaces.apache.org/core21/myfaces-impl/tlddoc-facelets/h/outputText.html )

      Example:
      <h:outputText value="abc" escape="false" /> --renders--> <span>abc</span>

      In 2.1.1 it corectly rendered just abc.

      Reason for the regression seems to be the optimization introduced in MYFACES-3237. I didn't go much into the details of the optimization mechanism, but seems that in HtmlTextRendererBase:renderOutput the "span = true" gets incorectly set when any attribute is encountered (and not only one of id/style/styleClass).

        Issue Links

          Activity

          Leonardo Uribe made changes -
          Link This issue relates to MYFACES-3583 [ MYFACES-3583 ]
          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Leonardo Uribe made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Leonardo Uribe [ lu4242 ]
          Fix Version/s 2.0.9 [ 12317644 ]
          Fix Version/s 2.1.3 [ 12317642 ]
          Resolution Fixed [ 1 ]
          Jarek made changes -
          Field Original Value New Value
          Description The h:outputText seems to incorectly render a <span> element, even though no id/style/styleClass attribute is specified (as specified in http://myfaces.apache.org/core21/myfaces-impl/tlddoc-facelets/index.html)

          Example:
          <h:outputText value="abc" escape="false" /> ---renders---> <span>abc</span>

          In 2.1.1 it corectly rendered just abc.

          Reason for the regression seems to be the optimization introduced in MYFACES-3237. I didn't go much into the details of the optimization mechanism, but seems that in HtmlTextRendererBase:renderOutput the "span = true" gets incorectly set when any attribute is encountered (and not only one of id/style/styleClass).

          The h:outputText seems to incorectly render a <span> element, even though no id/style/styleClass attribute is specified (as specified in http://myfaces.apache.org/core21/myfaces-impl/tlddoc-facelets/h/outputText.html )

          Example:
          <h:outputText value="abc" escape="false" /> ---renders---> <span>abc</span>

          In 2.1.1 it corectly rendered just abc.

          Reason for the regression seems to be the optimization introduced in MYFACES-3237. I didn't go much into the details of the optimization mechanism, but seems that in HtmlTextRendererBase:renderOutput the "span = true" gets incorectly set when any attribute is encountered (and not only one of id/style/styleClass).

          Jarek created issue -

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Jarek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development