1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <script type=
"text/javascript">
7 var html
= '<div foo="&"/>'
8 var element
= document
.body
9 var range
= element
.ownerDocument
.createRange();
10 range
.selectNodeContents(element
);
11 var fragment
= range
.createContextualFragment(html
);
13 document
.body
.appendChild(document
.createTextNode("Should be &: " + fragment
.firstChild
.getAttribute('foo')));
15 if (window
.testRunner
)
16 testRunner
.dumpAsText();
21 <body onload=
"test()">
22 <p> Test case for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=17403">bug
17403</a>: WebKit Creates Invalid Xhtml Links with Ajax
</p>
23 <p> You should see the sentence: 'Should be
&:
&' (without the quotes)
</p>