You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2016/10/28 00:28:39 UTC

svn commit: r1766910 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java

Author: lu4242
Date: Fri Oct 28 00:28:39 2016
New Revision: 1766910

URL: http://svn.apache.org/viewvc?rev=1766910&view=rev
Log:
MYFACES-4072 passthrough checked always set (add null check for render passthrough attributes)

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java?rev=1766910&r1=1766909&r2=1766910&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java Fri Oct 28 00:28:39 2016
@@ -435,7 +435,12 @@ public class HtmlResponseWriterImpl
                     // same here. After all, it is resposibility of the one who set the passthrough
                     // attribute to do the proper encoding in cases when a URI is provided. However,
                     // that does not means the attribute should not be encoded as other attributes.
-                    encodeAndWriteAttribute(key, value);
+                    // According to tests done, if passthrough attribute is null, the attribute must not
+                    // be rendered.
+                    if (value != null)
+                    {
+                        encodeAndWriteAttribute(key, value);
+                    }
                 }
             }