diff --git a/specs/node_spec.js b/specs/node_spec.js
index 069594d..2003f4d 100644
--- a/specs/node_spec.js
+++ b/specs/node_spec.js
@@ -12,9 +12,12 @@ describe("Jaml.Node", function() {
toEqual("\n");
});
- it("doesn't self-close for (for example) textarea", function(){
+ it("doesn't self-close for (for example) textarea and script", function(){
expect(new Jaml.Node("textarea").render()).
toEqual("\n");
+
+ expect(new Jaml.Node("script").render()).
+ toEqual("\n");
});
it("doesn't self-close if there are children", function(){
diff --git a/specs/template_spec.js b/specs/template_spec.js
index f5c63dd..47cd044 100644
--- a/specs/template_spec.js
+++ b/specs/template_spec.js
@@ -32,7 +32,7 @@ describe("Jaml.Template", function() {
}).render()).
toEqual("\n" +
"
\n" +
- " \n \n \n \n" +
+ " \n \n \n \n" +
" \n" +
" \n" +
" \n \n \n \n \n" +
diff --git a/src/Node.js b/src/Node.js
index 9474264..a8b2750 100644
--- a/src/Node.js
+++ b/src/Node.js
@@ -137,7 +137,7 @@ Jaml.Node.prototype = {
* @type Array
* An array of all tags that should be self closing
*/
- notSelfClosingTags: ['textarea']
+ notSelfClosingTags: ['textarea', 'script']
};
Jaml.TextNode = function(text) {