blob: 49f9f44c42ced488a1fd970fe45620ed8f508e73 [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="<script>var x = 1;</script>" 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>