Remove indeterm/value for createLink/unlink, again
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Thu, 15 Sep 2011 16:25:32 -0600
changeset 584 3cc579b879ac
parent 583 2d9559086d05
child 585 12706b7f7471
Remove indeterm/value for createLink/unlink, again

Correctly this time. Tests updated.

Fixes: http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067
conformancetest/data.js
conformancetest/runtest.html
editing.html
implementation.js
source.html
--- a/conformancetest/data.js	Thu Sep 15 15:18:48 2011 -0600
+++ b/conformancetest/data.js	Thu Sep 15 16:25:32 2011 -0600
@@ -1207,86 +1207,166 @@
 	[["stylewithcss","true"],["bold",""]],
 	"<span style=\"font-weight:100\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:200\"><span style=\"font-weight:bold\">b]</span>ar</span>",
 	{"stylewithcss":[null,false,null,null,true,null],"bold":[false,false,null,false,true,null]}],
+["foo[]bar",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"foo[]bar",
+	{"stylewithcss":[null,true,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<span>foo</span>{}<span>bar</span>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<span>foo</span>{}<span>bar</span>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<span>foo[</span><span>]bar</span>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<span>foo[</span><span>]bar</span>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["foo[bar]baz",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"foo<a href=\"http://www.google.com/\">[bar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["foo]bar[baz",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"foo<a href=\"http://www.google.com/\">[bar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<table><tbody><tr><td>foo</td><td>b<a href=\"http://www.google.com/\">[a]</a>r</td><td>baz</td></tr></tbody></table>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<table><tbody><tr><td>foo</td>{<td><a href=\"http://www.google.com/\">bar</a></td>}<td>baz</td></tr></tbody></table>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<table><tbody><tr>{<td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td>}<td>baz</td></tr></tbody></table>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<table><tbody>{<tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr>}</tbody></table>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<table>{<tbody><tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr></tbody>}</table>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"{<table><tbody><tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr></tbody></table>}",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=http://www.google.com/>foo[bar]baz</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">foo[bar]baz</a>",
-	{"stylewithcss":[null,true,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=http://www.google.com/>foo[barbaz</a>}",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">foo[barbaz</a>}",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["{<a href=http://www.google.com/>foobar]baz</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"{<a href=\"http://www.google.com/\">foobar]baz</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["{<a href=http://www.google.com/>foobarbaz</a>}",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"{<a href=\"http://www.google.com/\">foobarbaz}</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=http://www.google.com/>[foobarbaz]</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">[foobarbaz]</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo<a href=http://www.google.com/>[bar]</a>baz",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo<a href=\"http://www.google.com/\">[bar]</a>baz",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["[foo]<a href=http://www.google.com/>bar</a>baz",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<a href=\"http://www.google.com/\">[foo]bar</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["foo<a href=http://www.google.com/>bar</a>[baz]",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"foo<a href=\"http://www.google.com/\">bar[baz]</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo[<a href=http://www.google.com/>bar</a>]baz",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo[<a href=\"http://www.google.com/\">bar</a>]baz",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo<a href=http://www.google.com/>[bar</a>baz]",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo<a href=\"http://www.google.com/\">[barbaz]</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[true,null,"http://www.google.com/",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["[foo<a href=http://www.google.com/>bar]</a>baz",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<a href=\"http://www.google.com/\">[foobar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["[foo<a href=http://www.google.com/>bar</a>baz]",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl>foo[bar]baz</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">foo[bar]baz</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl>foo[barbaz</a>}",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">foo[barbaz</a>}",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["{<a href=otherurl>foobar]baz</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"{<a href=\"http://www.google.com/\">foobar]baz</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["{<a href=otherurl>foobarbaz</a>}",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"{<a href=\"http://www.google.com/\">foobarbaz}</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl>[foobarbaz]</a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\">[foobarbaz]</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo<a href=otherurl>[bar]</a>baz",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo<a href=\"http://www.google.com/\">[bar]</a>baz",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo[<a href=otherurl>bar</a>]baz",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo[<a href=\"http://www.google.com/\">bar</a>]baz",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo<a href=otherurl>[bar</a>baz]",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"foo<a href=\"http://www.google.com/\">[barbaz]</a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[true,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["[foo<a href=otherurl>bar]</a>baz",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<a href=\"http://www.google.com/\">[foobar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["[foo<a href=otherurl>bar</a>baz]",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl><b>foo[bar]baz</b></a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\"><b>foo[bar]baz</b></a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl><b>foo[barbaz</b></a>}",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\"><b>foo[barbaz</b></a>}",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["{<a href=otherurl><b>foobar]baz</b></a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"{<a href=\"http://www.google.com/\"><b>foobar]baz</b></a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["<a href=otherurl><b>[foobarbaz]</b></a>",
 	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
 	"<a href=\"http://www.google.com/\"><b>[foobarbaz]</b></a>",
-	{"stylewithcss":[null,false,null,null,false,null],"createlink":[false,null,"otherurl",false,null,"http://www.google.com/"]}],
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<a name=abc>foo[bar]baz</a>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<span name=\"abc\">foo<a href=\"http://www.google.com/\">[bar]</a>baz</span>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["<a name=abc><b>foo[bar]baz</b></a>",
+	[["stylewithcss","false"],["createlink","http://www.google.com/"]],
+	"<span name=\"abc\"><b>foo<a href=\"http://www.google.com/\">[bar]</a>baz</b></span>",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
+["foo[bar]baz",
+	[["stylewithcss","false"],["createlink",""]],
+	"foo[bar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"createlink":[null,null,null,null,null,null]}],
 ["foo[]bar",
 	[["stylewithcss","false"],["delete",""]],
 	"fo[]bar",
@@ -15875,6 +15955,110 @@
 	[["stylewithcss","true"],["underline",""]],
 	"<span style=\"text-decoration:underline\">fo</span>[o<ins>b]ar</ins>",
 	{"stylewithcss":[null,false,null,null,true,null],"underline":[false,true,null,true,false,null]}],
+["foo[]bar",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[]bar",
+	{"stylewithcss":[null,true,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<span>foo</span>{}<span>bar</span>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<span>foo</span>{}<span>bar</span>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<span>foo[</span><span>]bar</span>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<span>foo[</span><span>]bar</span>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a href=http://www.google.com/>foo[bar]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[bar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a href=http://www.google.com/>foo[barbaz</a>}",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[barbaz}",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["{<a href=http://www.google.com/>foobar]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"{foobar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["{<a href=http://www.google.com/>foobarbaz</a>}",
+	[["stylewithcss","false"],["unlink",""]],
+	"{foobarbaz}",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a href=http://www.google.com/>[foobarbaz]</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"[foobarbaz]",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo<a href=http://www.google.com/>b[]ar</a>baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foob[]arbaz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo<a href=http://www.google.com/>[bar]</a>baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[bar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo[<a href=http://www.google.com/>bar</a>]baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[bar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo<a href=http://www.google.com/>[bar</a>baz]",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[barbaz]",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["[foo<a href=http://www.google.com/>bar]</a>baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"[foobar]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["[foo<a href=http://www.google.com/>bar</a>baz]",
+	[["stylewithcss","false"],["unlink",""]],
+	"[foobarbaz]",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a id=foo href=http://www.google.com/>foobar[]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a id=\"foo\">foobar[]baz</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a id=foo href=http://www.google.com/>foo[bar]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a id=\"foo\">foo[bar]baz</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a id=foo href=http://www.google.com/>[foobarbaz]</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a id=\"foo\">[foobarbaz]</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo<a id=foo href=http://www.google.com/>[bar]</a>baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo<a id=\"foo\">[bar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo[<a id=foo href=http://www.google.com/>bar</a>]baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[<a id=\"foo\">bar</a>]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["[foo<a id=foo href=http://www.google.com/>bar</a>baz]",
+	[["stylewithcss","false"],["unlink",""]],
+	"[foo<a id=\"foo\">bar</a>baz]",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a name=foo>foobar[]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a name=\"foo\">foobar[]baz</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a name=foo>foo[bar]baz</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a name=\"foo\">foo[bar]baz</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["<a name=foo>[foobarbaz]</a>",
+	[["stylewithcss","false"],["unlink",""]],
+	"<a name=\"foo\">[foobarbaz]</a>",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo<a name=foo>[bar]</a>baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo<a name=\"foo\">[bar]</a>baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["foo[<a name=foo>bar</a>]baz",
+	[["stylewithcss","false"],["unlink",""]],
+	"foo[<a name=\"foo\">bar</a>]baz",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
+["[foo<a name=foo>bar</a>baz]",
+	[["stylewithcss","false"],["unlink",""]],
+	"[foo<a name=\"foo\">bar</a>baz]",
+	{"stylewithcss":[null,false,null,null,false,null],"unlink":[null,null,null,null,null,null]}],
 ["foo[bar]baz",
 	[["stylewithcss","false"],["selectall",""]],
 	"foo[bar]baz",
@@ -15916,6 +16100,10 @@
 	"foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
 	{"backcolor":[false,null,"rgb(255, 255, 255)",false,null,"rgb(0, 255, 255)"],"inserttext":[null,null,null,null,null,null]}],
 ["foo[]bar",
+	[["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
 	[["fontname","sans-serif"],["inserttext","a"]],
 	"foo<font face=\"sans-serif\">a[]</font>bar",
 	{"fontname":[false,null,"serif",false,null,"sans-serif"],"inserttext":[null,null,null,null,null,null]}],
@@ -15940,6 +16128,54 @@
 	"foo<sup>a[]</sup>bar",
 	{"subscript":[false,false,null,false,false,null],"superscript":[false,false,null,false,true,null],"inserttext":[null,null,null,null,null,null]}],
 ["foo[]bar",
+	[["createlink","http://www.google.com/"],["forecolor","#0000FF"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"createlink":[null,null,null,null,null,null],"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 255)"],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["forecolor","#0000FF"],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 255)"],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["createlink","http://www.google.com/"],["forecolor","blue"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"createlink":[null,null,null,null,null,null],"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 255)"],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["forecolor","blue"],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 255)"],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["createlink","http://www.google.com/"],["forecolor","brown"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\"><font color=\"#a52a2a\">a[]</font></a>bar",
+	{"createlink":[null,null,null,null,null,null],"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(165, 42, 42)"],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["forecolor","brown"],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\"><font color=\"#a52a2a\">a[]</font></a>bar",
+	{"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(165, 42, 42)"],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["createlink","http://www.google.com/"],["forecolor","black"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>bar",
+	{"createlink":[null,null,null,null,null,null],"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 0)"],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["forecolor","black"],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>bar",
+	{"forecolor":[false,null,"rgb(0, 0, 0)",false,null,"rgb(0, 0, 0)"],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["createlink","http://www.google.com/"],["underline",""],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"createlink":[null,null,null,null,null,null],"underline":[false,false,null,false,true,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["underline",""],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"underline":[false,false,null,false,true,null],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["createlink","http://www.google.com/"],["underline",""],["underline",""],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"createlink":[null,null,null,null,null,null],"underline":[false,false,null,false,true,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
+	[["underline",""],["underline",""],["createlink","http://www.google.com/"],["inserttext","a"]],
+	"foo<a href=\"http://www.google.com/\">a[]</a>bar",
+	{"underline":[false,false,null,false,true,null],"createlink":[null,null,null,null,null,null],"inserttext":[null,null,null,null,null,null]}],
+["foo[]bar",
 	[["subscript",""],["fontsize","2"],["inserttext","a"]],
 	"foo<sub>a[]</sub>bar",
 	{"subscript":[false,false,null,false,true,null],"fontsize":[false,null,"3",false,null,"2"],"inserttext":[null,null,null,null,null,null]}],
--- a/conformancetest/runtest.html	Thu Sep 15 15:18:48 2011 -0600
+++ b/conformancetest/runtest.html	Thu Sep 15 16:25:32 2011 -0600
@@ -143,10 +143,6 @@
 			"Unexpected innerHTML (after normalizing inline style)");
 	}, testName + " compare innerHTML");
 
-	// Temporary hack for http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067
-	delete expectedQueryResults.createlink;
-	delete expectedQueryResults.unlink;
-
 	for (var command in expectedQueryResults) {
 		var descriptions = [
 			'queryCommandIndeterm("' + command + '") before',
--- a/editing.html	Thu Sep 15 15:18:48 2011 -0600
+++ b/editing.html	Thu Sep 15 16:25:32 2011 -0600
@@ -2875,8 +2875,9 @@
     <li>If <var title="">new value</var> is null, unset the <a href=#value-override>value override</a>
     (if any).
 
-    <li>Otherwise, if <var title="">command</var> has a <a href=#value>value</a> specified,
-    set the <a href=#value-override>value override</a> to <var title="">new value</var>.
+    <li>Otherwise, if <var title="">command</var> is "createLink" or it has a
+    <a href=#value>value</a> specified, set the <a href=#value-override>value override</a> to
+    <var title="">new value</var>.
 
     <li>Abort these steps.
   </ol>
@@ -3071,10 +3072,20 @@
 
 <h3 id=the-createlink-command><dfn>The <code title="">createLink</code> command</dfn></h3>
 
-<p class=comments> If the selection doesn't contain anything (meaning, e.g.,
-deleteContents() doesn't change anything), then Chrome 12 dev inserts a link at
-the selection start, with the text equal to the link URL.  Other browsers don't
-do it, so I don't either.
+<div class=comments>
+<p>If the selection doesn't contain anything (meaning, e.g., deleteContents()
+doesn't change anything), then Chrome 12 dev inserts a link at the selection
+start, with the text equal to the link URL.  Other browsers don't do it, so I
+don't either.
+
+<p>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do not support
+indeterminate, state, or value for createLink or unlink.  I previously defined
+indeterminate and value anyway because they make sense, but then <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067">undefined them</a>.
+The nontrivial thing is what value to return if there's no link, since any
+string can occur as a link href, in principle.
+
+<p>What are the use-cases for indeterm, state, or value for createLink/unlink?
+</div>
 
 <p><a href=#action>Action</a>:
 
@@ -3123,12 +3134,6 @@
   <li><a href="#set-the-selection's-value">Set the selection's value</a> to <var title="">value</var>.
 </ol>
 
-<p class=comments>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do
-not support indeterminate, state, or value for createLink or unlink.  I define
-indeterminate and value anyway because they make sense.
-
-<p><a href=#standard-inline-value-command>Standard inline value command</a>
-
 
 <h3 id=the-fontname-command><dfn>The <code title="">fontName</code> command</dfn></h3>
 
@@ -3865,12 +3870,17 @@
 
 <h3 id=the-unlink-command><dfn>The <code title="">unlink</code> command</dfn></h3>
 
-<p class=comments>IE 9 RC unlinks the whole link you're pointing at, while
-others only unlink the current text.  The latter behavior seems less expected,
-as with createLink, although I can't articulate precisely why.  Word 2007 and
-OpenOffice.org 3.2.1 (Ubuntu) seem to give an option to remove the whole link
-or none of it, which backs the spec's requirement.  See also #whatwg logs
-starting at 2011-05-13 at 16:53 EDT (UTC-0400).
+<div class=comments>
+<p>IE 9 RC unlinks the whole link you're pointing at, while others only unlink
+the current text.  The latter behavior seems less expected, as with createLink,
+although I can't articulate precisely why.  Word 2007 and OpenOffice.org 3.2.1
+(Ubuntu) seem to give an option to remove the whole link or none of it, which
+backs the spec's requirement.  See also #whatwg logs starting at 2011-05-13 at
+16:53 EDT (UTC-0400).
+
+<p>See comment for <a href=#the-createlink-command>the <code title="">createLink</code> command</a> about
+indeterm/state/value.
+</div>
 
 <p><a href=#action>Action</a>:
 
@@ -3882,12 +3892,6 @@
   <li><a href=#clear-the-value>Clear the value</a> of each member of <var title="">hyperlinks</var>.
 </ol>
 
-<p class=comments>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do
-not support indeterminate, state, or value for createLink or unlink.  I define
-indeterminate and value anyway because they make sense.
-
-<p><a href=#standard-inline-value-command>Standard inline value command</a>
-
 
 
 <h2 id=block-formatting-commands>Block formatting commands</h2>
@@ -4417,8 +4421,8 @@
 
   <li>If <var title="">node</var> is null, return <var title="">overrides</var>.
 
-  <li>Add ("createLink", <a href=#value>value</a> for "createLink") to
-  <var title="">overrides</var>.
+  <li>Add ("createLink", <var title="">node</var>'s <a href=#effective-command-value>effective command value</a>
+  for "createLink") to <var title="">overrides</var>.
 
   <li>
   <p class=comments>Thus we will set state overrides based on the first
@@ -4471,11 +4475,23 @@
     returns something different from <var title="">override</var>, call <code title=execCommand()><a href=#execcommand()>execCommand(<var title="">command</var>)</a></code>.
 
     <li>Otherwise, if <var title="">override</var> is a string, and <var title="">command</var>
-    is not "fontSize", and <code title=queryCommandValue()><a href=#querycommandvalue()>queryCommandValue(<var title="">command</var>)</a></code>
+    is neither "createLink" nor "fontSize", and <code title=queryCommandValue()><a href=#querycommandvalue()>queryCommandValue(<var title="">command</var>)</a></code>
     returns something not <a href=#equivalent-values title="equivalent values">equivalent</a> to
     <var title="">override</var>, call <code title=execCommand()><a href=#execcommand()>execCommand(<var title="">command</var>, false,
     <var title="">override</var>)</a></code>.
 
+    <li>
+    <p class=comments>This special case is needed because <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067">createLink has no
+    value</a>.
+    
+    <p>Otherwise, if <var title="">override</var> is a string; and <var title="">command</var>
+    is "createLink"; and either there is a <a href=#value-override>value override</a> for
+    "createLink" that is not equal to <var title="">override</var>, or there is no
+    <a href=#value-override>value override</a> for "createLink" and <var title="">node</var>'s
+    <a href=#effective-command-value>effective command value</a> for "createLink" is not equal to
+    <var title="">override</var>: call <code title=execCommand()><a href=#execcommand()>execCommand("createLink", false,
+    <var title="">override</var>)</a></code>.
+
     <li>Otherwise, if <var title="">override</var> is a string; and <var title="">command</var>
     is "fontSize"; and either there is a <a href=#value-override>value override</a> for
     "fontSize" that is not equal to <var title="">override</var>, or there is no
--- a/implementation.js	Thu Sep 15 15:18:48 2011 -0600
+++ b/implementation.js	Thu Sep 15 16:25:32 2011 -0600
@@ -2943,9 +2943,9 @@
 		if (newValue === null) {
 			unsetValueOverride(command);
 
-		// "Otherwise, if command has a value specified, set the value override
-		// to new value."
-		} else if ("value" in commands[command]) {
+		// "Otherwise, if command is "createLink" or it has a value specified,
+		// set the value override to new value."
+		} else if (command == "createlink" || "value" in commands[command]) {
 			setValueOverride(command, newValue);
 		}
 
@@ -3114,7 +3114,7 @@
 
 		// "Set the selection's value to value."
 		setSelectionValue("createlink", value);
-	}, standardInlineValueCommand: true
+	}
 };
 
 //@}
@@ -3649,7 +3649,7 @@
 		for (var i = 0; i < hyperlinks.length; i++) {
 			clearValue(hyperlinks[i], "unlink");
 		}
-	}, standardInlineValueCommand: true
+	}
 };
 
 //@}
@@ -4221,8 +4221,9 @@
 		return overrides;
 	}
 
-	// "Add ("createLink", value for "createLink") to overrides."
-	overrides.push(["createlink", commands.createlink.value()]);
+	// "Add ("createLink", node's effective command value for "createLink") to
+	// overrides."
+	overrides.push(["createlink", getEffectiveCommandValue(node, "createlink")]);
 
 	// "For each command in the list "bold", "italic", "strikethrough",
 	// "subscript", "superscript", "underline", in order: if node's effective
@@ -4273,15 +4274,35 @@
 			&& myQueryCommandState(command) != override) {
 				myExecCommand(command);
 
-			// "Otherwise, if override is a string, and command is not
-			// "fontSize", and queryCommandValue(command) returns something not
-			// equivalent to override, call execCommand(command, false,
-			// override)."
+			// "Otherwise, if override is a string, and command is neither
+			// "createLink" nor "fontSize", and queryCommandValue(command)
+			// returns something not equivalent to override, call
+			// execCommand(command, false, override)."
 			} else if (typeof override == "string"
+			&& command != "createlink"
 			&& command != "fontsize"
 			&& !areEquivalentValues(command, myQueryCommandValue(command), override)) {
 				myExecCommand(command, false, override);
 
+			// "Otherwise, if override is a string; and command is
+			// "createLink"; and either there is a value override for
+			// "createLink" that is not equal to override, or there is no value
+			// override for "createLink" and node's effective command value for
+			// "createLink" is not equal to override: call
+			// execCommand("createLink", false, override)."
+			} else if (typeof override == "string"
+			&& command == "createlink"
+			&& (
+				(
+					getValueOverride("createlink") !== undefined
+					&& getValueOverride("createlink") !== override
+				) || (
+					getValueOverride("createlink") === undefined
+					&& getEffectiveCommandValue(node, "createlink") !== override
+				)
+			)) {
+				myExecCommand("createlink", false, override);
+
 			// "Otherwise, if override is a string; and command is "fontSize";
 			// and either there is a value override for "fontSize" that is not
 			// equal to override, or there is no value override for "fontSize"
--- a/source.html	Thu Sep 15 15:18:48 2011 -0600
+++ b/source.html	Thu Sep 15 16:25:32 2011 -0600
@@ -2880,8 +2880,9 @@
     <li>If <var>new value</var> is null, unset the <span>value override</span>
     (if any).
 
-    <li>Otherwise, if <var>command</var> has a <span>value</span> specified,
-    set the <span>value override</span> to <var>new value</var>.
+    <li>Otherwise, if <var>command</var> is "createLink" or it has a
+    <span>value</span> specified, set the <span>value override</span> to
+    <var>new value</var>.
 
     <li>Abort these steps.
   </ol>
@@ -3078,10 +3079,21 @@
 <!-- @} -->
 <h3><dfn>The <code title>createLink</code> command</dfn></h3>
 <!-- @{ -->
-<p class=comments> If the selection doesn't contain anything (meaning, e.g.,
-deleteContents() doesn't change anything), then Chrome 12 dev inserts a link at
-the selection start, with the text equal to the link URL.  Other browsers don't
-do it, so I don't either.
+<div class=comments>
+<p>If the selection doesn't contain anything (meaning, e.g., deleteContents()
+doesn't change anything), then Chrome 12 dev inserts a link at the selection
+start, with the text equal to the link URL.  Other browsers don't do it, so I
+don't either.
+
+<p>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do not support
+indeterminate, state, or value for createLink or unlink.  I previously defined
+indeterminate and value anyway because they make sense, but then <a
+href=http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067>undefined them</a>.
+The nontrivial thing is what value to return if there's no link, since any
+string can occur as a link href, in principle.
+
+<p>What are the use-cases for indeterm, state, or value for createLink/unlink?
+</div>
 
 <p><span>Action</span>:
 
@@ -3130,12 +3142,6 @@
   <li><span>Set the selection's value</span> to <var>value</var>.
 </ol>
 
-<p class=comments>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do
-not support indeterminate, state, or value for createLink or unlink.  I define
-indeterminate and value anyway because they make sense.
-
-<p><span>Standard inline value command</span>
-
 <!-- @} -->
 <h3><dfn>The <code title>fontName</code> command</dfn></h3>
 <!-- @{ -->
@@ -3880,12 +3886,17 @@
 <!-- @} -->
 <h3><dfn>The <code title>unlink</code> command</dfn></h3>
 <!-- @{ -->
-<p class=comments>IE 9 RC unlinks the whole link you're pointing at, while
-others only unlink the current text.  The latter behavior seems less expected,
-as with createLink, although I can't articulate precisely why.  Word 2007 and
-OpenOffice.org 3.2.1 (Ubuntu) seem to give an option to remove the whole link
-or none of it, which backs the spec's requirement.  See also #whatwg logs
-starting at 2011-05-13 at 16:53 EDT (UTC-0400).
+<div class=comments>
+<p>IE 9 RC unlinks the whole link you're pointing at, while others only unlink
+the current text.  The latter behavior seems less expected, as with createLink,
+although I can't articulate precisely why.  Word 2007 and OpenOffice.org 3.2.1
+(Ubuntu) seem to give an option to remove the whole link or none of it, which
+backs the spec's requirement.  See also #whatwg logs starting at 2011-05-13 at
+16:53 EDT (UTC-0400).
+
+<p>See comment for <span>the <code title>createLink</code> command</span> about
+indeterm/state/value.
+</div>
 
 <p><span>Action</span>:
 
@@ -3897,12 +3908,6 @@
   <li><span>Clear the value</span> of each member of <var>hyperlinks</var>.
 </ol>
 
-<p class=comments>IE10PP2, Firefox 7.0a2, Chrome 14 dev, and Opera 11.50 all do
-not support indeterminate, state, or value for createLink or unlink.  I define
-indeterminate and value anyway because they make sense.
-
-<p><span>Standard inline value command</span>
-
 <!-- @} -->
 
 <h2>Block formatting commands</h2>
@@ -4437,8 +4442,8 @@
 
   <li>If <var>node</var> is null, return <var>overrides</var>.
 
-  <li>Add ("createLink", <span>value</span> for "createLink") to
-  <var>overrides</var>.
+  <li>Add ("createLink", <var>node</var>'s <span>effective command value</span>
+  for "createLink") to <var>overrides</var>.
 
   <li>
   <p class=comments>Thus we will set state overrides based on the first
@@ -4493,13 +4498,26 @@
     title=execCommand()>execCommand(<var>command</var>)</code>.
 
     <li>Otherwise, if <var>override</var> is a string, and <var>command</var>
-    is not "fontSize", and <code
+    is neither "createLink" nor "fontSize", and <code
     title=queryCommandValue()>queryCommandValue(<var>command</var>)</code>
     returns something not <span title="equivalent values">equivalent</span> to
     <var>override</var>, call <code
     title=execCommand()>execCommand(<var>command</var>, false,
     <var>override</var>)</code>.
 
+    <li>
+    <p class=comments>This special case is needed because <a
+    href=http://www.w3.org/Bugs/Public/show_bug.cgi?id=14067>createLink has no
+    value</a>.
+    
+    <p>Otherwise, if <var>override</var> is a string; and <var>command</var>
+    is "createLink"; and either there is a <span>value override</span> for
+    "createLink" that is not equal to <var>override</var>, or there is no
+    <span>value override</span> for "createLink" and <var>node</var>'s
+    <span>effective command value</span> for "createLink" is not equal to
+    <var>override</var>: call [[execcommand|"createLink", false,
+    <var>override</var>]].
+
     <li>Otherwise, if <var>override</var> is a string; and <var>command</var>
     is "fontSize"; and either there is a <span>value override</span> for
     "fontSize" that is not equal to <var>override</var>, or there is no