4 <script type=
"data:text/html">
5 <html xmlns:
v=
"urn:schemas-microsoft-com:vml"
6 xmlns:
o=
"urn:schemas-microsoft-com:office:office"
7 xmlns:
x=
"urn:schemas-microsoft-com:office:excel"
8 xmlns=
"http://www.w3.org/TR/REC-html40">
10 <meta http-equiv=Content-Type
content=
"text/html; charset=utf-8">
11 <meta name=ProgId content=Excel.Sheet
>
12 <meta name=Generator
content=
"Microsoft Excel 14">
13 <link id=Main-File rel=Main-File
href=
"dummy_path">
14 <link rel=File-List
href=
"dummy_path2">
15 <base href=
"dummy-base">
16 <title>Dummy Title
</title>
19 {mso-displayed-decimal-separator:"\.";
20 mso-displayed-thousand-separator:"\,";}
22 {margin:1.0in .75in 1.0in .75in;
23 mso-header-margin:.5in;
24 mso-footer-margin:.5in;}
35 font-family:Calibri, sans-serif;
37 mso-number-format:General;
39 vertical-align:bottom;
41 mso-background-source:auto;
43 mso-protection:locked visible;
49 <body link=blue vlink=purple
>
50 <table border=
0 cellpadding=
0 cellspacing=
0 width=
130 style='border-collapse:
51 collapse;width:
130pt'
>
53 <col width=
65 span=
2 style='width:
65pt'
>
54 <tr height=
15 style='height:
15.0pt'
>
55 <td height=
15 width=
65 style='height:
15.0pt;width:
65pt'
>hello
</td>
56 <td width=
65 style='width:
65pt'
>world
</td>
58 <tr height=
15 style='height:
15.0pt'
>
59 <td height=
15 style='height:
15.0pt'
></td>
67 <p>This test ensures WebKit strips away base, link, meta, style, and title elements before inserting HTML.
</p>
68 <div id=
"test" contenteditable
></div>
69 <pre><script type=
"text/javascript">
71 var htmlInPasteboard
= document
.getElementsByTagName('script')[0].firstChild
.textContent
;
72 document
.getElementById('test').focus();
73 document
.execCommand('InsertHTML', false, htmlInPasteboard
);
76 function expectNoInstanceOf(elementName
) {
77 var elements
= document
.body
.getElementsByTagName(elementName
);
78 if (elements
.length
<= 0)
81 document
.write('FAIL - found ' + elements
.length
+ ' ');
82 document
.write(elements
.length
== 1 ? 'instance' : 'instances');
83 document
.writeln(' of ' + elementName
+ ' element');
87 if (window
.testRunner
)
88 testRunner
.dumpAsText();
90 expectNoInstanceOf('base');
91 expectNoInstanceOf('meta');
92 expectNoInstanceOf('link');
93 expectNoInstanceOf('title');
94 expectNoInstanceOf('style');
96 document
.writeln('PASS');
98 document
.getElementById('test').innerHTML
= '';