Author: johnh
Date: Thu Sep 11 14:49:20 2008
New Revision: 694505

URL: http://svn.apache.org/viewvc?rev=694505&view=rev
Log:
Committing patch by levik@ (Lev Epshteyn), renaming <os:RenderAll> to 
<os:Render>, adding aliases for backward compatibility, and addin comment to 
<os:Html>. This closes issue SHINDIG-591.


Modified:
    incubator/shindig/trunk/features/opensocial-templates/namespaces.js

Modified: incubator/shindig/trunk/features/opensocial-templates/namespaces.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-templates/namespaces.js?rev=694505&r1=694504&r2=694505&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-templates/namespaces.js 
(original)
+++ incubator/shindig/trunk/features/opensocial-templates/namespaces.js Thu Sep 
11 14:49:20 2008
@@ -145,10 +145,10 @@
       os.createNamespace("os", "http://opensocial.com/#template";);
       
   /**
-   * renderAll custom tag renders the specified child nodes of the current 
+   * <os:Render> custom tag renders the specified child nodes of the current 
    * context.
    */
-  osn.renderAll = function(node, data, context) {
+  osn.Render = function(node, data, context) {
     var parent = context.getVariable(os.VAR_parentnode);
     var exp = node.getAttribute("content") || "*";
     var result = os.getValueFromNode_(parent, exp);
@@ -177,8 +177,13 @@
     
     return result;
   }
-  osn.RenderAll = osn.renderAll;
+  osn.render = osn.RenderAll = osn.renderAll = osn.Render;
   
+  /**
+   * <os:Html> custom tag renders HTML content (as opposed to HTML code), so
+   * <os:Html code="<b>Hello</b>"/> would result in the bold string "Hello", 
+   * rather than the text of the markup. 
+   */
   osn.Html = function(node) {
     var html = node.code ? "" + node.code : node.getAttribute("code") || "";
     // TODO(levik): Sanitize the HTML here to avoid script injection issues.


Reply via email to