You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/08/18 09:07:03 UTC

svn commit: r1756743 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java

Author: lofwyr
Date: Thu Aug 18 09:07:03 2016
New Revision: 1756743

URL: http://svn.apache.org/viewvc?rev=1756743&view=rev
Log:
TOBAGO-1534: Some dependencies currently breaking CSP (Content Security Policy) in Tobago 3
* using own tobago-jsf.js instead of jsf.js from JSF
 ( this also fixes a problem with <tc:suggest> and <tc:file> on the same page with MyFaces 2.0. It's a problem with MultiPart detection in JS )

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java?rev=1756743&r1=1756742&r2=1756743&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java Thu Aug 18 09:07:03 2016
@@ -208,6 +208,13 @@ public class PageRenderer extends Render
 
       for (int i = 0, childCount = componentResources.size(); i < childCount; i++) {
         UIComponent child = componentResources.get(i);
+        // XXX hack to remove jsf.js
+        if ("jsf.js".equals(child.getAttributes().get("name"))) {
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Skip rendering resource jsf.js");
+          }
+          continue;
+        }
         child.encodeAll(facesContext);
       }