JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix garbage after </
[peach-html5-editor.git] / test.coffee
index 9035e5b..55470ce 100644 (file)
@@ -2699,7 +2699,7 @@ tests = [
        }, {
                name: "template.dat #108"
                html: "<template><a><table><a>"
-               expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <a>\n|           <a>\n|           <table>\n|   <body>"
+               expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <a>\n|           <a>\n|           <table>\n|   <body>\n"
        }, {
                name: "tests10.dat #1"
                html: "<!DOCTYPE html><svg></svg>"
@@ -7955,7 +7955,7 @@ serialize_els = (els, prefix = '| ') ->
                                attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
                                for k in attr_keys
                                        ret += "#{prefix}  #{k}=\"#{el.attrs[k]}\"\n"
-                               if el.name is 'template' # ?check ns
+                               if el.name is 'template' and el.namespace is wheic.NS_HTML
                                        ret += "#{prefix}  content\n"
                                        ret += serialize_els el.children, "#{prefix}    "
                                else