blob: 3c64d4729f374b84723f24a5f3643d2cf357907e [file] [log] [blame]
This test copies all the elements containing event handlers and javascript urls, pastes them in an editable area and verifies that no script, handlers or javascript urls are copied.
Hello
CNN Hello
This is a form
Submit.
Hello 
CNN Hello  
This is a form
Submit.
<button id="button1" onclick="sayHello()" ondblclick="sayHello()" style="width: 100px;">Hello</button>
<button id="button1" style="width: 100px;">Hello</button>
<a id="anchor1" href="http://www.cnn.com/">CNN</a>
<a id="anchor1" href="http://www.cnn.com/">CNN</a>
<a id="anchor2" href="javascript:sayHello()">Hello</a>
<a id="anchor2">Hello</a>
<iframe id="iframe1" src="javascript:var x = 1;" style="width: 200px; height: 100px; background-color:#cee;"></iframe>
<iframe id="iframe1" style="width: 200px; height: 100px; background-color: rgb(204, 238, 238);"></iframe>
<iframe id="iframe2" srcdoc="&lt;script&gt;var x = 1;&lt;/script&gt;" style="width: 200px; height: 100px; background-color:#cee;"></iframe>
<iframe id="iframe2" style="width: 200px; height: 100px; background-color: rgb(204, 238, 238);"></iframe>
<form id="form1" action="javascript:sayHello()" formaction="javascript:sayHello()" style="width: 200px; height: 150px; background-color:#cee;">This is a form<br><img src="../resources/abe.png"><button formaction="javascript:sayHello()">Submit.</button></form>
<form id="form1" formaction="javascript:sayHello()" style="width: 200px; height: 150px; background-color: rgb(204, 238, 238);">This is a form<br><img src="../resources/abe.png"><button>Submit.</button></form>