1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <body onload="runTest()">
6 This test copies the content of an iframe and pastes it
7 in an editable area in an xhtml document and verifies that no script, handlers or javascript urls are copied.
9 <iframe id="iframe1" src="resources/paste-noscript-content.html"></iframe>
10 <div id="pastehere" contenteditable="true"></div>
11 <script src="../../resources/dump-as-markup.js"></script>
14 Markup.waitUntilDone();
17 Markup.description(document.getElementById('description').textContent);
19 var doc = frames[0].document;
20 getSelection().collapse(doc.body, 0);
21 doc.execCommand("SelectAll");
22 doc.execCommand("Copy");
24 Markup.dump(doc.body, 'Copied content');
26 getSelection().collapse(document.getElementById("pastehere"), 0);
27 document.execCommand("Paste");
28 Markup.dump('pastehere', 'Pasted content');