From 83900b02303eb0205623dbe90885028870af0218 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 23 Jan 2013 12:36:08 +0000 Subject: [PATCH] Fixed problem with erroneous rendering of empty HTML tags We were doing things like `
`, which HTML doesn't like --- core/modules/rendertree/renderers/element.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/core/modules/rendertree/renderers/element.js b/core/modules/rendertree/renderers/element.js index cb746f6df..8b9e41081 100644 --- a/core/modules/rendertree/renderers/element.js +++ b/core/modules/rendertree/renderers/element.js @@ -140,20 +140,15 @@ ElementRenderer.prototype.render = function(type) { } } } - if(!this.widget.children || this.widget.children.length === 0) { - output.push("/"); - } output.push(">"); } - if(this.widget.children && this.widget.children.length > 0) { - $tw.utils.each(this.widget.children,function(node) { - if(node.render) { - output.push(node.render(type)); - } - }); - if(isHtml) { - output.push(""); + $tw.utils.each(this.widget.children,function(node) { + if(node.render) { + output.push(node.render(type)); } + }); + if(isHtml) { + output.push(""); } return output.join(""); };