editor/libeditor/base/crashtests/768765.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <script>
     6 function boom()
     7 {
     8   var root = document.documentElement;
    10   while (root.firstChild) { root.removeChild(root.firstChild); }
    12   var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
    13   var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
    14   root.contentEditable = "true";
    15   root.appendChild(div);
    16   root.removeChild(div);
    17   root.insertBefore(body, root.firstChild);
    19   window.getSelection().removeAllRanges();
    20   var r0 = document.createRange();
    21   r0.setStart(body, 0);
    22   r0.setEnd(body, 0);
    23   window.getSelection().addRange(r0);
    24   var r1 = document.createRange();
    25   r1.setStart(div, 0);
    26   r1.setEnd(div, 0);
    27   window.getSelection().addRange(r1);
    29   document.execCommand("inserthtml", false, "1");
    30 }
    32 </script>
    33 </head>
    35 <body onload="boom();"></body>
    36 </html>

mercurial