diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-10-27 08:25:23 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-10-27 08:25:23 +0000 |
commit | 8b4292ae9523c1f1ce1c6c1702fc7ccb898cfde0 (patch) | |
tree | 9bcd7dce6f0f8dd11b12019f63b72e78a9f45e5e | |
parent | 37bcef675226554a51a59f78e1aba40a43f02c89 (diff) | |
download | libhubbub-8b4292ae9523c1f1ce1c6c1702fc7ccb898cfde0.tar.gz libhubbub-8b4292ae9523c1f1ce1c6c1702fc7ccb898cfde0.tar.bz2 |
Fix handling of xmlns attributes on foreign content root elements
svn path=/trunk/hubbub/; revision=13083
-rw-r--r-- | src/treebuilder/in_foreign_content.c | 5 | ||||
-rw-r--r-- | 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 @@ | <tr> | <td> | "transparent" + +#data +<svg xmlns="http://www.w3.org/2000/svg"></svg> +#errors +#document +| <html> +| <head> +| <body> +| <svg svg> +| xmlns xmlns="http://www.w3.org/2000/svg" |