jchaffraix@webkit.org | 1221cd2 | 2008-04-14 11:50:21 +0000 | [diff] [blame] | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 | <head> |
| 3 | <script type="text/javascript"> |
| 4 | <![CDATA[ |
| 5 | function test() |
| 6 | { |
| 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); |
| 12 | |
| 13 | document.body.appendChild(document.createTextNode("Should be &: " + fragment.firstChild.getAttribute('foo'))); |
| 14 | |
rniwa@webkit.org | 59a6acf | 2012-08-02 05:53:47 +0000 | [diff] [blame] | 15 | if (window.testRunner) |
| 16 | testRunner.dumpAsText(); |
jchaffraix@webkit.org | 1221cd2 | 2008-04-14 11:50:21 +0000 | [diff] [blame] | 17 | } |
| 18 | ]]> |
| 19 | </script> |
| 20 | </head> |
| 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> |
| 24 | </body> |
| 25 | </html> |