| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <script type="text/javascript"> |
| <![CDATA[ |
| function test() |
| { |
| var html = '<div foo="&"/>' |
| var element = document.body |
| var range = element.ownerDocument.createRange(); |
| range.selectNodeContents(element); |
| var fragment = range.createContextualFragment(html); |
| |
| document.body.appendChild(document.createTextNode("Should be &: " + fragment.firstChild.getAttribute('foo'))); |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| } |
| ]]> |
| </script> |
| </head> |
| <body onload="test()"> |
| <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> |
| <p> You should see the sentence: 'Should be &: &' (without the quotes) </p> |
| </body> |
| </html> |