myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1766910 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
Date Fri, 28 Oct 2016 00:28:39 GMT
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);
+                    }
                 }
             }
 



Mime
View raw message