From 8b4292ae9523c1f1ce1c6c1702fc7ccb898cfde0 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 27 Oct 2011 08:25:23 +0000 Subject: Fix handling of xmlns attributes on foreign content root elements svn path=/trunk/hubbub/; revision=13083 --- src/treebuilder/in_foreign_content.c | 5 +++-- test/data/tree-construction/regression.dat | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/treebuilder/in_foreign_content.c b/src/treebuilder/in_foreign_content.c index fa76a09..d53be1f 100644 --- a/src/treebuilder/in_foreign_content.c +++ b/src/treebuilder/in_foreign_content.c @@ -275,8 +275,9 @@ void adjust_foreign_attributes(hubbub_treebuilder *treebuilder, attr->name.len -= 4; } } else if (hubbub_string_match(name, attr->name.len, - S("xmlns")) || - hubbub_string_match(name, attr->name.len, + S("xmlns"))) { + attr->ns = HUBBUB_NS_XMLNS; + } else if (hubbub_string_match(name, attr->name.len, S("xmlns:xlink"))) { attr->ns = HUBBUB_NS_XMLNS; attr->name.ptr += 6; diff --git a/test/data/tree-construction/regression.dat b/test/data/tree-construction/regression.dat index ab71f42..7149dc1 100644 --- a/test/data/tree-construction/regression.dat +++ b/test/data/tree-construction/regression.dat @@ -75,3 +75,13 @@ | | | "transparent" + +#data + +#errors +#document +| +| +| +| +| xmlns xmlns="http://www.w3.org/2000/svg" -- cgit v1.2.3