Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
require_once dirname(dirname(__FILE__)) . '/XML_Feed_Parser_TestCase.php';
4
 
5
class sanitize_TestCase extends XML_Feed_Parser_Converted_TestCase {
6
 
7
    function test_entry_content_applet_1() {
8
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_applet.xml');
9
 
10
        $feed = new XML_Feed_Parser($content, false, true);
11
 
12
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
13
    }
14
 
15
    function test_entry_content_blink_1() {
16
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_blink.xml');
17
 
18
        $feed = new XML_Feed_Parser($content, false, true);
19
 
20
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
21
    }
22
 
23
    function test_entry_content_crazy_1() {
24
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_crazy.xml');
25
 
26
        $feed = new XML_Feed_Parser($content, false, true);
27
 
28
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->content(0, 'value'));
29
    }
30
 
31
    function test_entry_content_embed_1() {
32
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_embed.xml');
33
 
34
        $feed = new XML_Feed_Parser($content, false, true);
35
 
36
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
37
    }
38
 
39
    function test_entry_content_frame_1() {
40
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_frame.xml');
41
 
42
        $feed = new XML_Feed_Parser($content, false, true);
43
 
44
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
45
    }
46
 
47
    function test_entry_content_iframe_1() {
48
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_iframe.xml');
49
 
50
        $feed = new XML_Feed_Parser($content, false, true);
51
 
52
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
53
    }
54
 
55
    function test_entry_content_link_1() {
56
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_link.xml');
57
 
58
        $feed = new XML_Feed_Parser($content, false, true);
59
 
60
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
61
    }
62
 
63
    function test_entry_content_meta_1() {
64
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_meta.xml');
65
 
66
        $feed = new XML_Feed_Parser($content, false, true);
67
 
68
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
69
    }
70
 
71
    function test_entry_content_object_1() {
72
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_object.xml');
73
 
74
        $feed = new XML_Feed_Parser($content, false, true);
75
 
76
        $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value'));
77
    }
78
 
79
    function test_entry_content_onabort_1() {
80
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onabort.xml');
81
 
82
        $feed = new XML_Feed_Parser($content, false, true);
83
 
84
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
85
    }
86
 
87
    function test_entry_content_onblur_1() {
88
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onblur.xml');
89
 
90
        $feed = new XML_Feed_Parser($content, false, true);
91
 
92
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
93
    }
94
 
95
    function test_entry_content_onchange_1() {
96
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onchange.xml');
97
 
98
        $feed = new XML_Feed_Parser($content, false, true);
99
 
100
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
101
    }
102
 
103
    function test_entry_content_onclick_1() {
104
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onclick.xml');
105
 
106
        $feed = new XML_Feed_Parser($content, false, true);
107
 
108
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
109
    }
110
 
111
    function test_entry_content_ondblclick_1() {
112
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_ondblclick.xml');
113
 
114
        $feed = new XML_Feed_Parser($content, false, true);
115
 
116
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
117
    }
118
 
119
    function test_entry_content_onerror_1() {
120
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onerror.xml');
121
 
122
        $feed = new XML_Feed_Parser($content, false, true);
123
 
124
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
125
    }
126
 
127
    function test_entry_content_onfocus_1() {
128
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onfocus.xml');
129
 
130
        $feed = new XML_Feed_Parser($content, false, true);
131
 
132
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
133
    }
134
 
135
    function test_entry_content_onkeydown_1() {
136
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeydown.xml');
137
 
138
        $feed = new XML_Feed_Parser($content, false, true);
139
 
140
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
141
    }
142
 
143
    function test_entry_content_onkeypress_1() {
144
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeypress.xml');
145
 
146
        $feed = new XML_Feed_Parser($content, false, true);
147
 
148
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
149
    }
150
 
151
    function test_entry_content_onkeyup_1() {
152
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeyup.xml');
153
 
154
        $feed = new XML_Feed_Parser($content, false, true);
155
 
156
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
157
    }
158
 
159
    function test_entry_content_onload_1() {
160
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onload.xml');
161
 
162
        $feed = new XML_Feed_Parser($content, false, true);
163
 
164
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
165
    }
166
 
167
    function test_entry_content_onmousedown_1() {
168
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmousedown.xml');
169
 
170
        $feed = new XML_Feed_Parser($content, false, true);
171
 
172
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
173
    }
174
 
175
    function test_entry_content_onmouseout_1() {
176
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseout.xml');
177
 
178
        $feed = new XML_Feed_Parser($content, false, true);
179
 
180
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
181
    }
182
 
183
    function test_entry_content_onmouseover_1() {
184
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseover.xml');
185
 
186
        $feed = new XML_Feed_Parser($content, false, true);
187
 
188
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
189
    }
190
 
191
    function test_entry_content_onmouseup_1() {
192
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseup.xml');
193
 
194
        $feed = new XML_Feed_Parser($content, false, true);
195
 
196
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
197
    }
198
 
199
    function test_entry_content_onreset_1() {
200
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onreset.xml');
201
 
202
        $feed = new XML_Feed_Parser($content, false, true);
203
 
204
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
205
    }
206
 
207
    function test_entry_content_onresize_1() {
208
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onresize.xml');
209
 
210
        $feed = new XML_Feed_Parser($content, false, true);
211
 
212
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
213
    }
214
 
215
    function test_entry_content_onsubmit_1() {
216
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onsubmit.xml');
217
 
218
        $feed = new XML_Feed_Parser($content, false, true);
219
 
220
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
221
    }
222
 
223
    function test_entry_content_onunload_1() {
224
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onunload.xml');
225
 
226
        $feed = new XML_Feed_Parser($content, false, true);
227
 
228
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value'));
229
    }
230
 
231
    function test_entry_content_script_1() {
232
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script.xml');
233
 
234
        $feed = new XML_Feed_Parser($content, false, true);
235
 
236
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
237
    }
238
 
239
    function test_entry_content_script_base64_1() {
240
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_base64.xml');
241
 
242
        $feed = new XML_Feed_Parser($content, false, true);
243
 
244
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
245
    }
246
 
247
    function test_entry_content_script_cdata_1() {
248
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_cdata.xml');
249
 
250
        $feed = new XML_Feed_Parser($content, false, true);
251
 
252
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
253
    }
254
 
255
    function test_entry_content_script_inline_1() {
256
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_inline.xml');
257
 
258
        $feed = new XML_Feed_Parser($content, false, true);
259
 
260
        $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->content(0, 'value'));
261
    }
262
 
263
    function test_entry_content_style_1() {
264
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_style.xml');
265
 
266
        $feed = new XML_Feed_Parser($content, false, true);
267
 
268
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
269
    }
270
 
271
    function test_entry_summary_applet_1() {
272
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_applet.xml');
273
 
274
        $feed = new XML_Feed_Parser($content, false, true);
275
 
276
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
277
    }
278
 
279
    function test_entry_summary_blink_1() {
280
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_blink.xml');
281
 
282
        $feed = new XML_Feed_Parser($content, false, true);
283
 
284
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
285
    }
286
 
287
    function test_entry_summary_crazy_1() {
288
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_crazy.xml');
289
 
290
        $feed = new XML_Feed_Parser($content, false, true);
291
 
292
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->summary);
293
    }
294
 
295
    function test_entry_summary_embed_1() {
296
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_embed.xml');
297
 
298
        $feed = new XML_Feed_Parser($content, false, true);
299
 
300
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
301
    }
302
 
303
    function test_entry_summary_frame_1() {
304
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_frame.xml');
305
 
306
        $feed = new XML_Feed_Parser($content, false, true);
307
 
308
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
309
    }
310
 
311
    function test_entry_summary_iframe_1() {
312
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_iframe.xml');
313
 
314
        $feed = new XML_Feed_Parser($content, false, true);
315
 
316
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
317
    }
318
 
319
    function test_entry_summary_link_1() {
320
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_link.xml');
321
 
322
        $feed = new XML_Feed_Parser($content, false, true);
323
 
324
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
325
    }
326
 
327
    function test_entry_summary_meta_1() {
328
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_meta.xml');
329
 
330
        $feed = new XML_Feed_Parser($content, false, true);
331
 
332
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
333
    }
334
 
335
    function test_entry_summary_object_1() {
336
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_object.xml');
337
 
338
        $feed = new XML_Feed_Parser($content, false, true);
339
 
340
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
341
    }
342
 
343
    function test_entry_summary_onabort_1() {
344
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onabort.xml');
345
 
346
        $feed = new XML_Feed_Parser($content, false, true);
347
 
348
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
349
    }
350
 
351
    function test_entry_summary_onblur_1() {
352
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onblur.xml');
353
 
354
        $feed = new XML_Feed_Parser($content, false, true);
355
 
356
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
357
    }
358
 
359
    function test_entry_summary_onchange_1() {
360
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onchange.xml');
361
 
362
        $feed = new XML_Feed_Parser($content, false, true);
363
 
364
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
365
    }
366
 
367
    function test_entry_summary_onclick_1() {
368
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onclick.xml');
369
 
370
        $feed = new XML_Feed_Parser($content, false, true);
371
 
372
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
373
    }
374
 
375
    function test_entry_summary_ondblclick_1() {
376
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_ondblclick.xml');
377
 
378
        $feed = new XML_Feed_Parser($content, false, true);
379
 
380
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
381
    }
382
 
383
    function test_entry_summary_onerror_1() {
384
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onerror.xml');
385
 
386
        $feed = new XML_Feed_Parser($content, false, true);
387
 
388
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
389
    }
390
 
391
    function test_entry_summary_onfocus_1() {
392
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onfocus.xml');
393
 
394
        $feed = new XML_Feed_Parser($content, false, true);
395
 
396
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
397
    }
398
 
399
    function test_entry_summary_onkeydown_1() {
400
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeydown.xml');
401
 
402
        $feed = new XML_Feed_Parser($content, false, true);
403
 
404
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
405
    }
406
 
407
    function test_entry_summary_onkeypress_1() {
408
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeypress.xml');
409
 
410
        $feed = new XML_Feed_Parser($content, false, true);
411
 
412
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
413
    }
414
 
415
    function test_entry_summary_onkeyup_1() {
416
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeyup.xml');
417
 
418
        $feed = new XML_Feed_Parser($content, false, true);
419
 
420
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
421
    }
422
 
423
    function test_entry_summary_onload_1() {
424
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onload.xml');
425
 
426
        $feed = new XML_Feed_Parser($content, false, true);
427
 
428
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
429
    }
430
 
431
    function test_entry_summary_onmousedown_1() {
432
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmousedown.xml');
433
 
434
        $feed = new XML_Feed_Parser($content, false, true);
435
 
436
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
437
    }
438
 
439
    function test_entry_summary_onmouseout_1() {
440
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseout.xml');
441
 
442
        $feed = new XML_Feed_Parser($content, false, true);
443
 
444
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
445
    }
446
 
447
    function test_entry_summary_onmouseover_1() {
448
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseover.xml');
449
 
450
        $feed = new XML_Feed_Parser($content, false, true);
451
 
452
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
453
    }
454
 
455
    function test_entry_summary_onmouseup_1() {
456
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseup.xml');
457
 
458
        $feed = new XML_Feed_Parser($content, false, true);
459
 
460
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
461
    }
462
 
463
    function test_entry_summary_onreset_1() {
464
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onreset.xml');
465
 
466
        $feed = new XML_Feed_Parser($content, false, true);
467
 
468
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
469
    }
470
 
471
    function test_entry_summary_onresize_1() {
472
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onresize.xml');
473
 
474
        $feed = new XML_Feed_Parser($content, false, true);
475
 
476
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
477
    }
478
 
479
    function test_entry_summary_onsubmit_1() {
480
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onsubmit.xml');
481
 
482
        $feed = new XML_Feed_Parser($content, false, true);
483
 
484
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
485
    }
486
 
487
    function test_entry_summary_onunload_1() {
488
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onunload.xml');
489
 
490
        $feed = new XML_Feed_Parser($content, false, true);
491
 
492
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary);
493
    }
494
 
495
    function test_entry_summary_script_1() {
496
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script.xml');
497
 
498
        $feed = new XML_Feed_Parser($content, false, true);
499
 
500
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
501
    }
502
 
503
    function test_entry_summary_script_base64_1() {
504
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_base64.xml');
505
 
506
        $feed = new XML_Feed_Parser($content, false, true);
507
 
508
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
509
    }
510
 
511
    function test_entry_summary_script_cdata_1() {
512
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_cdata.xml');
513
 
514
        $feed = new XML_Feed_Parser($content, false, true);
515
 
516
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
517
    }
518
 
519
    function test_entry_summary_script_inline_1() {
520
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_inline.xml');
521
 
522
        $feed = new XML_Feed_Parser($content, false, true);
523
 
524
        $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->summary);
525
    }
526
 
527
    function test_entry_summary_script_map_description_1() {
528
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_map_description.xml');
529
 
530
        $feed = new XML_Feed_Parser($content, false, true);
531
 
532
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
533
    }
534
 
535
    function test_entry_summary_style_1() {
536
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_style.xml');
537
 
538
        $feed = new XML_Feed_Parser($content, false, true);
539
 
540
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->summary);
541
    }
542
 
543
    function test_entry_title_applet_1() {
544
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_applet.xml');
545
 
546
        $feed = new XML_Feed_Parser($content, false, true);
547
 
548
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
549
    }
550
 
551
    function test_entry_title_blink_1() {
552
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_blink.xml');
553
 
554
        $feed = new XML_Feed_Parser($content, false, true);
555
 
556
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
557
    }
558
 
559
    function test_entry_title_crazy_1() {
560
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_crazy.xml');
561
 
562
        $feed = new XML_Feed_Parser($content, false, true);
563
 
564
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->title);
565
    }
566
 
567
    function test_entry_title_embed_1() {
568
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_embed.xml');
569
 
570
        $feed = new XML_Feed_Parser($content, false, true);
571
 
572
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
573
    }
574
 
575
    function test_entry_title_frame_1() {
576
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_frame.xml');
577
 
578
        $feed = new XML_Feed_Parser($content, false, true);
579
 
580
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
581
    }
582
 
583
    function test_entry_title_iframe_1() {
584
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_iframe.xml');
585
 
586
        $feed = new XML_Feed_Parser($content, false, true);
587
 
588
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
589
    }
590
 
591
    function test_entry_title_link_1() {
592
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_link.xml');
593
 
594
        $feed = new XML_Feed_Parser($content, false, true);
595
 
596
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
597
    }
598
 
599
    function test_entry_title_meta_1() {
600
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_meta.xml');
601
 
602
        $feed = new XML_Feed_Parser($content, false, true);
603
 
604
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
605
    }
606
 
607
    function test_entry_title_object_1() {
608
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_object.xml');
609
 
610
        $feed = new XML_Feed_Parser($content, false, true);
611
 
612
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
613
    }
614
 
615
    function test_entry_title_onabort_1() {
616
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onabort.xml');
617
 
618
        $feed = new XML_Feed_Parser($content, false, true);
619
 
620
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
621
    }
622
 
623
    function test_entry_title_onblur_1() {
624
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onblur.xml');
625
 
626
        $feed = new XML_Feed_Parser($content, false, true);
627
 
628
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
629
    }
630
 
631
    function test_entry_title_onchange_1() {
632
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onchange.xml');
633
 
634
        $feed = new XML_Feed_Parser($content, false, true);
635
 
636
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
637
    }
638
 
639
    function test_entry_title_onclick_1() {
640
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onclick.xml');
641
 
642
        $feed = new XML_Feed_Parser($content, false, true);
643
 
644
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
645
    }
646
 
647
    function test_entry_title_ondblclick_1() {
648
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_ondblclick.xml');
649
 
650
        $feed = new XML_Feed_Parser($content, false, true);
651
 
652
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
653
    }
654
 
655
    function test_entry_title_onerror_1() {
656
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onerror.xml');
657
 
658
        $feed = new XML_Feed_Parser($content, false, true);
659
 
660
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
661
    }
662
 
663
    function test_entry_title_onfocus_1() {
664
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onfocus.xml');
665
 
666
        $feed = new XML_Feed_Parser($content, false, true);
667
 
668
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
669
    }
670
 
671
    function test_entry_title_onkeydown_1() {
672
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeydown.xml');
673
 
674
        $feed = new XML_Feed_Parser($content, false, true);
675
 
676
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
677
    }
678
 
679
    function test_entry_title_onkeypress_1() {
680
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeypress.xml');
681
 
682
        $feed = new XML_Feed_Parser($content, false, true);
683
 
684
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
685
    }
686
 
687
    function test_entry_title_onkeyup_1() {
688
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeyup.xml');
689
 
690
        $feed = new XML_Feed_Parser($content, false, true);
691
 
692
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
693
    }
694
 
695
    function test_entry_title_onload_1() {
696
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onload.xml');
697
 
698
        $feed = new XML_Feed_Parser($content, false, true);
699
 
700
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
701
    }
702
 
703
    function test_entry_title_onmousedown_1() {
704
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmousedown.xml');
705
 
706
        $feed = new XML_Feed_Parser($content, false, true);
707
 
708
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
709
    }
710
 
711
    function test_entry_title_onmouseout_1() {
712
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseout.xml');
713
 
714
        $feed = new XML_Feed_Parser($content, false, true);
715
 
716
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
717
    }
718
 
719
    function test_entry_title_onmouseover_1() {
720
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseover.xml');
721
 
722
        $feed = new XML_Feed_Parser($content, false, true);
723
 
724
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
725
    }
726
 
727
    function test_entry_title_onmouseup_1() {
728
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseup.xml');
729
 
730
        $feed = new XML_Feed_Parser($content, false, true);
731
 
732
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
733
    }
734
 
735
    function test_entry_title_onreset_1() {
736
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onreset.xml');
737
 
738
        $feed = new XML_Feed_Parser($content, false, true);
739
 
740
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
741
    }
742
 
743
    function test_entry_title_onresize_1() {
744
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onresize.xml');
745
 
746
        $feed = new XML_Feed_Parser($content, false, true);
747
 
748
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
749
    }
750
 
751
    function test_entry_title_onsubmit_1() {
752
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onsubmit.xml');
753
 
754
        $feed = new XML_Feed_Parser($content, false, true);
755
 
756
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
757
    }
758
 
759
    function test_entry_title_onunload_1() {
760
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onunload.xml');
761
 
762
        $feed = new XML_Feed_Parser($content, false, true);
763
 
764
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title);
765
    }
766
 
767
    function test_entry_title_script_1() {
768
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script.xml');
769
 
770
        $feed = new XML_Feed_Parser($content, false, true);
771
 
772
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
773
    }
774
 
775
    function test_entry_title_script_cdata_1() {
776
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script_cdata.xml');
777
 
778
        $feed = new XML_Feed_Parser($content, false, true);
779
 
780
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title);
781
    }
782
 
783
    function test_entry_title_script_inline_1() {
784
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script_inline.xml');
785
 
786
        $feed = new XML_Feed_Parser($content, false, true);
787
 
788
        $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->title);
789
    }
790
 
791
    function test_entry_title_style_1() {
792
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_style.xml');
793
 
794
        $feed = new XML_Feed_Parser($content, false, true);
795
 
796
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->title);
797
    }
798
 
799
    function test_feed_copyright_applet_1() {
800
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_applet.xml');
801
 
802
        $feed = new XML_Feed_Parser($content, false, true);
803
 
804
        $this->assertEquals('safe description', $feed->copyright);
805
    }
806
 
807
    function test_feed_copyright_blink_1() {
808
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_blink.xml');
809
 
810
        $feed = new XML_Feed_Parser($content, false, true);
811
 
812
        $this->assertEquals('safe description', $feed->copyright);
813
    }
814
 
815
    function test_feed_copyright_crazy_1() {
816
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_crazy.xml');
817
 
818
        $feed = new XML_Feed_Parser($content, false, true);
819
 
820
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->copyright);
821
    }
822
 
823
    function test_feed_copyright_embed_1() {
824
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_embed.xml');
825
 
826
        $feed = new XML_Feed_Parser($content, false, true);
827
 
828
        $this->assertEquals('safe description', $feed->copyright);
829
    }
830
 
831
    function test_feed_copyright_frame_1() {
832
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_frame.xml');
833
 
834
        $feed = new XML_Feed_Parser($content, false, true);
835
 
836
        $this->assertEquals('safe description', $feed->copyright);
837
    }
838
 
839
    function test_feed_copyright_iframe_1() {
840
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_iframe.xml');
841
 
842
        $feed = new XML_Feed_Parser($content, false, true);
843
 
844
        $this->assertEquals('safe description', $feed->copyright);
845
    }
846
 
847
    function test_feed_copyright_link_1() {
848
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_link.xml');
849
 
850
        $feed = new XML_Feed_Parser($content, false, true);
851
 
852
        $this->assertEquals('safe description', $feed->copyright);
853
    }
854
 
855
    function test_feed_copyright_meta_1() {
856
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_meta.xml');
857
 
858
        $feed = new XML_Feed_Parser($content, false, true);
859
 
860
        $this->assertEquals('safe description', $feed->copyright);
861
    }
862
 
863
    function test_feed_copyright_object_1() {
864
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_object.xml');
865
 
866
        $feed = new XML_Feed_Parser($content, false, true);
867
 
868
        $this->assertEquals('safe description', $feed->copyright);
869
    }
870
 
871
    function test_feed_copyright_onabort_1() {
872
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onabort.xml');
873
 
874
        $feed = new XML_Feed_Parser($content, false, true);
875
 
876
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
877
    }
878
 
879
    function test_feed_copyright_onblur_1() {
880
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onblur.xml');
881
 
882
        $feed = new XML_Feed_Parser($content, false, true);
883
 
884
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
885
    }
886
 
887
    function test_feed_copyright_onchange_1() {
888
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onchange.xml');
889
 
890
        $feed = new XML_Feed_Parser($content, false, true);
891
 
892
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
893
    }
894
 
895
    function test_feed_copyright_onclick_1() {
896
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onclick.xml');
897
 
898
        $feed = new XML_Feed_Parser($content, false, true);
899
 
900
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
901
    }
902
 
903
    function test_feed_copyright_ondblclick_1() {
904
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_ondblclick.xml');
905
 
906
        $feed = new XML_Feed_Parser($content, false, true);
907
 
908
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
909
    }
910
 
911
    function test_feed_copyright_onerror_1() {
912
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onerror.xml');
913
 
914
        $feed = new XML_Feed_Parser($content, false, true);
915
 
916
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
917
    }
918
 
919
    function test_feed_copyright_onfocus_1() {
920
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onfocus.xml');
921
 
922
        $feed = new XML_Feed_Parser($content, false, true);
923
 
924
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
925
    }
926
 
927
    function test_feed_copyright_onkeydown_1() {
928
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeydown.xml');
929
 
930
        $feed = new XML_Feed_Parser($content, false, true);
931
 
932
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
933
    }
934
 
935
    function test_feed_copyright_onkeypress_1() {
936
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeypress.xml');
937
 
938
        $feed = new XML_Feed_Parser($content, false, true);
939
 
940
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
941
    }
942
 
943
    function test_feed_copyright_onkeyup_1() {
944
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeyup.xml');
945
 
946
        $feed = new XML_Feed_Parser($content, false, true);
947
 
948
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
949
    }
950
 
951
    function test_feed_copyright_onload_1() {
952
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onload.xml');
953
 
954
        $feed = new XML_Feed_Parser($content, false, true);
955
 
956
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
957
    }
958
 
959
    function test_feed_copyright_onmousedown_1() {
960
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmousedown.xml');
961
 
962
        $feed = new XML_Feed_Parser($content, false, true);
963
 
964
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
965
    }
966
 
967
    function test_feed_copyright_onmouseout_1() {
968
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseout.xml');
969
 
970
        $feed = new XML_Feed_Parser($content, false, true);
971
 
972
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
973
    }
974
 
975
    function test_feed_copyright_onmouseover_1() {
976
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseover.xml');
977
 
978
        $feed = new XML_Feed_Parser($content, false, true);
979
 
980
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
981
    }
982
 
983
    function test_feed_copyright_onmouseup_1() {
984
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseup.xml');
985
 
986
        $feed = new XML_Feed_Parser($content, false, true);
987
 
988
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
989
    }
990
 
991
    function test_feed_copyright_onreset_1() {
992
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onreset.xml');
993
 
994
        $feed = new XML_Feed_Parser($content, false, true);
995
 
996
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
997
    }
998
 
999
    function test_feed_copyright_onresize_1() {
1000
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onresize.xml');
1001
 
1002
        $feed = new XML_Feed_Parser($content, false, true);
1003
 
1004
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
1005
    }
1006
 
1007
    function test_feed_copyright_onsubmit_1() {
1008
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onsubmit.xml');
1009
 
1010
        $feed = new XML_Feed_Parser($content, false, true);
1011
 
1012
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
1013
    }
1014
 
1015
    function test_feed_copyright_onunload_1() {
1016
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onunload.xml');
1017
 
1018
        $feed = new XML_Feed_Parser($content, false, true);
1019
 
1020
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright);
1021
    }
1022
 
1023
    function test_feed_copyright_script_1() {
1024
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script.xml');
1025
 
1026
        $feed = new XML_Feed_Parser($content, false, true);
1027
 
1028
        $this->assertEquals('safe description', $feed->copyright);
1029
    }
1030
 
1031
    function test_feed_copyright_script_cdata_1() {
1032
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script_cdata.xml');
1033
 
1034
        $feed = new XML_Feed_Parser($content, false, true);
1035
 
1036
        $this->assertEquals('safe description', $feed->copyright);
1037
    }
1038
 
1039
    function test_feed_copyright_script_inline_1() {
1040
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script_inline.xml');
1041
 
1042
        $feed = new XML_Feed_Parser($content, false, true);
1043
 
1044
        $this->assertEquals('<div>safe description</div>', $feed->copyright);
1045
    }
1046
 
1047
    function test_feed_copyright_style_1() {
1048
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_style.xml');
1049
 
1050
        $feed = new XML_Feed_Parser($content, false, true);
1051
 
1052
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->copyright);
1053
    }
1054
 
1055
    function test_feed_info_applet_1() {
1056
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_applet.xml');
1057
 
1058
        $feed = new XML_Feed_Parser($content, false, true);
1059
 
1060
        $this->assertEquals('safe description', $feed->info);
1061
    }
1062
 
1063
    function test_feed_info_blink_1() {
1064
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_blink.xml');
1065
 
1066
        $feed = new XML_Feed_Parser($content, false, true);
1067
 
1068
        $this->assertEquals('safe description', $feed->info);
1069
    }
1070
 
1071
    function test_feed_info_crazy_1() {
1072
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_crazy.xml');
1073
 
1074
        $feed = new XML_Feed_Parser($content, false, true);
1075
 
1076
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->info);
1077
    }
1078
 
1079
    function test_feed_info_embed_1() {
1080
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_embed.xml');
1081
 
1082
        $feed = new XML_Feed_Parser($content, false, true);
1083
 
1084
        $this->assertEquals('safe description', $feed->info);
1085
    }
1086
 
1087
    function test_feed_info_frame_1() {
1088
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_frame.xml');
1089
 
1090
        $feed = new XML_Feed_Parser($content, false, true);
1091
 
1092
        $this->assertEquals('safe description', $feed->info);
1093
    }
1094
 
1095
    function test_feed_info_iframe_1() {
1096
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_iframe.xml');
1097
 
1098
        $feed = new XML_Feed_Parser($content, false, true);
1099
 
1100
        $this->assertEquals('safe description', $feed->info);
1101
    }
1102
 
1103
    function test_feed_info_link_1() {
1104
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_link.xml');
1105
 
1106
        $feed = new XML_Feed_Parser($content, false, true);
1107
 
1108
        $this->assertEquals('safe description', $feed->info);
1109
    }
1110
 
1111
    function test_feed_info_meta_1() {
1112
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_meta.xml');
1113
 
1114
        $feed = new XML_Feed_Parser($content, false, true);
1115
 
1116
        $this->assertEquals('safe description', $feed->info);
1117
    }
1118
 
1119
    function test_feed_info_object_1() {
1120
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_object.xml');
1121
 
1122
        $feed = new XML_Feed_Parser($content, false, true);
1123
 
1124
        $this->assertEquals('safe description', $feed->info);
1125
    }
1126
 
1127
    function test_feed_info_onabort_1() {
1128
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onabort.xml');
1129
 
1130
        $feed = new XML_Feed_Parser($content, false, true);
1131
 
1132
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1133
    }
1134
 
1135
    function test_feed_info_onblur_1() {
1136
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onblur.xml');
1137
 
1138
        $feed = new XML_Feed_Parser($content, false, true);
1139
 
1140
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1141
    }
1142
 
1143
    function test_feed_info_onchange_1() {
1144
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onchange.xml');
1145
 
1146
        $feed = new XML_Feed_Parser($content, false, true);
1147
 
1148
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1149
    }
1150
 
1151
    function test_feed_info_onclick_1() {
1152
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onclick.xml');
1153
 
1154
        $feed = new XML_Feed_Parser($content, false, true);
1155
 
1156
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1157
    }
1158
 
1159
    function test_feed_info_ondblclick_1() {
1160
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_ondblclick.xml');
1161
 
1162
        $feed = new XML_Feed_Parser($content, false, true);
1163
 
1164
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1165
    }
1166
 
1167
    function test_feed_info_onerror_1() {
1168
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onerror.xml');
1169
 
1170
        $feed = new XML_Feed_Parser($content, false, true);
1171
 
1172
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1173
    }
1174
 
1175
    function test_feed_info_onfocus_1() {
1176
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onfocus.xml');
1177
 
1178
        $feed = new XML_Feed_Parser($content, false, true);
1179
 
1180
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1181
    }
1182
 
1183
    function test_feed_info_onkeydown_1() {
1184
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeydown.xml');
1185
 
1186
        $feed = new XML_Feed_Parser($content, false, true);
1187
 
1188
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1189
    }
1190
 
1191
    function test_feed_info_onkeypress_1() {
1192
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeypress.xml');
1193
 
1194
        $feed = new XML_Feed_Parser($content, false, true);
1195
 
1196
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1197
    }
1198
 
1199
    function test_feed_info_onkeyup_1() {
1200
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeyup.xml');
1201
 
1202
        $feed = new XML_Feed_Parser($content, false, true);
1203
 
1204
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1205
    }
1206
 
1207
    function test_feed_info_onload_1() {
1208
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onload.xml');
1209
 
1210
        $feed = new XML_Feed_Parser($content, false, true);
1211
 
1212
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1213
    }
1214
 
1215
    function test_feed_info_onmousedown_1() {
1216
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmousedown.xml');
1217
 
1218
        $feed = new XML_Feed_Parser($content, false, true);
1219
 
1220
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1221
    }
1222
 
1223
    function test_feed_info_onmouseout_1() {
1224
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseout.xml');
1225
 
1226
        $feed = new XML_Feed_Parser($content, false, true);
1227
 
1228
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1229
    }
1230
 
1231
    function test_feed_info_onmouseover_1() {
1232
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseover.xml');
1233
 
1234
        $feed = new XML_Feed_Parser($content, false, true);
1235
 
1236
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1237
    }
1238
 
1239
    function test_feed_info_onmouseup_1() {
1240
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseup.xml');
1241
 
1242
        $feed = new XML_Feed_Parser($content, false, true);
1243
 
1244
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1245
    }
1246
 
1247
    function test_feed_info_onreset_1() {
1248
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onreset.xml');
1249
 
1250
        $feed = new XML_Feed_Parser($content, false, true);
1251
 
1252
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1253
    }
1254
 
1255
    function test_feed_info_onresize_1() {
1256
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onresize.xml');
1257
 
1258
        $feed = new XML_Feed_Parser($content, false, true);
1259
 
1260
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1261
    }
1262
 
1263
    function test_feed_info_onsubmit_1() {
1264
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onsubmit.xml');
1265
 
1266
        $feed = new XML_Feed_Parser($content, false, true);
1267
 
1268
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1269
    }
1270
 
1271
    function test_feed_info_onunload_1() {
1272
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onunload.xml');
1273
 
1274
        $feed = new XML_Feed_Parser($content, false, true);
1275
 
1276
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info);
1277
    }
1278
 
1279
    function test_feed_info_script_1() {
1280
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script.xml');
1281
 
1282
        $feed = new XML_Feed_Parser($content, false, true);
1283
 
1284
        $this->assertEquals('safe description', $feed->info);
1285
    }
1286
 
1287
    function test_feed_info_script_cdata_1() {
1288
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script_cdata.xml');
1289
 
1290
        $feed = new XML_Feed_Parser($content, false, true);
1291
 
1292
        $this->assertEquals('safe description', $feed->info);
1293
    }
1294
 
1295
    function test_feed_info_script_inline_1() {
1296
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script_inline.xml');
1297
 
1298
        $feed = new XML_Feed_Parser($content, false, true);
1299
 
1300
        $this->assertEquals('<div>safe description</div>', $feed->info);
1301
    }
1302
 
1303
    function test_feed_info_style_1() {
1304
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_style.xml');
1305
 
1306
        $feed = new XML_Feed_Parser($content, false, true);
1307
 
1308
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->info);
1309
    }
1310
 
1311
    function test_feed_subtitle_applet_1() {
1312
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_applet.xml');
1313
 
1314
        $feed = new XML_Feed_Parser($content, false, true);
1315
 
1316
        $this->assertEquals('safe description', $feed->tagline);
1317
    }
1318
 
1319
    function test_feed_subtitle_blink_1() {
1320
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_blink.xml');
1321
 
1322
        $feed = new XML_Feed_Parser($content, false, true);
1323
 
1324
        $this->assertEquals('safe description', $feed->tagline);
1325
    }
1326
 
1327
    function test_feed_subtitle_crazy_1() {
1328
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_crazy.xml');
1329
 
1330
        $feed = new XML_Feed_Parser($content, false, true);
1331
 
1332
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->tagline);
1333
    }
1334
 
1335
    function test_feed_subtitle_embed_1() {
1336
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_embed.xml');
1337
 
1338
        $feed = new XML_Feed_Parser($content, false, true);
1339
 
1340
        $this->assertEquals('safe description', $feed->tagline);
1341
    }
1342
 
1343
    function test_feed_subtitle_frame_1() {
1344
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_frame.xml');
1345
 
1346
        $feed = new XML_Feed_Parser($content, false, true);
1347
 
1348
        $this->assertEquals('safe description', $feed->tagline);
1349
    }
1350
 
1351
    function test_feed_subtitle_iframe_1() {
1352
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_iframe.xml');
1353
 
1354
        $feed = new XML_Feed_Parser($content, false, true);
1355
 
1356
        $this->assertEquals('safe description', $feed->tagline);
1357
    }
1358
 
1359
    function test_feed_subtitle_link_1() {
1360
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_link.xml');
1361
 
1362
        $feed = new XML_Feed_Parser($content, false, true);
1363
 
1364
        $this->assertEquals('safe description', $feed->tagline);
1365
    }
1366
 
1367
    function test_feed_subtitle_meta_1() {
1368
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_meta.xml');
1369
 
1370
        $feed = new XML_Feed_Parser($content, false, true);
1371
 
1372
        $this->assertEquals('safe description', $feed->tagline);
1373
    }
1374
 
1375
    function test_feed_subtitle_object_1() {
1376
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_object.xml');
1377
 
1378
        $feed = new XML_Feed_Parser($content, false, true);
1379
 
1380
        $this->assertEquals('safe description', $feed->tagline);
1381
    }
1382
 
1383
    function test_feed_subtitle_onabort_1() {
1384
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onabort.xml');
1385
 
1386
        $feed = new XML_Feed_Parser($content, false, true);
1387
 
1388
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1389
    }
1390
 
1391
    function test_feed_subtitle_onblur_1() {
1392
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onblur.xml');
1393
 
1394
        $feed = new XML_Feed_Parser($content, false, true);
1395
 
1396
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1397
    }
1398
 
1399
    function test_feed_subtitle_onchange_1() {
1400
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onchange.xml');
1401
 
1402
        $feed = new XML_Feed_Parser($content, false, true);
1403
 
1404
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1405
    }
1406
 
1407
    function test_feed_subtitle_onclick_1() {
1408
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onclick.xml');
1409
 
1410
        $feed = new XML_Feed_Parser($content, false, true);
1411
 
1412
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1413
    }
1414
 
1415
    function test_feed_subtitle_ondblclick_1() {
1416
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_ondblclick.xml');
1417
 
1418
        $feed = new XML_Feed_Parser($content, false, true);
1419
 
1420
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1421
    }
1422
 
1423
    function test_feed_subtitle_onerror_1() {
1424
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onerror.xml');
1425
 
1426
        $feed = new XML_Feed_Parser($content, false, true);
1427
 
1428
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1429
    }
1430
 
1431
    function test_feed_subtitle_onfocus_1() {
1432
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onfocus.xml');
1433
 
1434
        $feed = new XML_Feed_Parser($content, false, true);
1435
 
1436
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1437
    }
1438
 
1439
    function test_feed_subtitle_onkeydown_1() {
1440
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeydown.xml');
1441
 
1442
        $feed = new XML_Feed_Parser($content, false, true);
1443
 
1444
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1445
    }
1446
 
1447
    function test_feed_subtitle_onkeypress_1() {
1448
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeypress.xml');
1449
 
1450
        $feed = new XML_Feed_Parser($content, false, true);
1451
 
1452
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1453
    }
1454
 
1455
    function test_feed_subtitle_onkeyup_1() {
1456
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeyup.xml');
1457
 
1458
        $feed = new XML_Feed_Parser($content, false, true);
1459
 
1460
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1461
    }
1462
 
1463
    function test_feed_subtitle_onload_1() {
1464
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onload.xml');
1465
 
1466
        $feed = new XML_Feed_Parser($content, false, true);
1467
 
1468
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1469
    }
1470
 
1471
    function test_feed_subtitle_onmousedown_1() {
1472
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmousedown.xml');
1473
 
1474
        $feed = new XML_Feed_Parser($content, false, true);
1475
 
1476
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1477
    }
1478
 
1479
    function test_feed_subtitle_onmouseout_1() {
1480
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseout.xml');
1481
 
1482
        $feed = new XML_Feed_Parser($content, false, true);
1483
 
1484
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1485
    }
1486
 
1487
    function test_feed_subtitle_onmouseover_1() {
1488
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseover.xml');
1489
 
1490
        $feed = new XML_Feed_Parser($content, false, true);
1491
 
1492
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1493
    }
1494
 
1495
    function test_feed_subtitle_onmouseup_1() {
1496
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseup.xml');
1497
 
1498
        $feed = new XML_Feed_Parser($content, false, true);
1499
 
1500
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1501
    }
1502
 
1503
    function test_feed_subtitle_onreset_1() {
1504
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onreset.xml');
1505
 
1506
        $feed = new XML_Feed_Parser($content, false, true);
1507
 
1508
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1509
    }
1510
 
1511
    function test_feed_subtitle_onresize_1() {
1512
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onresize.xml');
1513
 
1514
        $feed = new XML_Feed_Parser($content, false, true);
1515
 
1516
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1517
    }
1518
 
1519
    function test_feed_subtitle_onsubmit_1() {
1520
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onsubmit.xml');
1521
 
1522
        $feed = new XML_Feed_Parser($content, false, true);
1523
 
1524
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1525
    }
1526
 
1527
    function test_feed_subtitle_onunload_1() {
1528
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onunload.xml');
1529
 
1530
        $feed = new XML_Feed_Parser($content, false, true);
1531
 
1532
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1533
    }
1534
 
1535
    function test_feed_subtitle_script_1() {
1536
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script.xml');
1537
 
1538
        $feed = new XML_Feed_Parser($content, false, true);
1539
 
1540
        $this->assertEquals('safe description', $feed->tagline);
1541
    }
1542
 
1543
    function test_feed_subtitle_script_cdata_1() {
1544
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script_cdata.xml');
1545
 
1546
        $feed = new XML_Feed_Parser($content, false, true);
1547
 
1548
        $this->assertEquals('safe description', $feed->tagline);
1549
    }
1550
 
1551
    function test_feed_subtitle_script_inline_1() {
1552
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script_inline.xml');
1553
 
1554
        $feed = new XML_Feed_Parser($content, false, true);
1555
 
1556
        $this->assertEquals('<div>safe description</div>', $feed->tagline);
1557
    }
1558
 
1559
    function test_feed_subtitle_style_1() {
1560
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_style.xml');
1561
 
1562
        $feed = new XML_Feed_Parser($content, false, true);
1563
 
1564
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->tagline);
1565
    }
1566
 
1567
    function test_feed_tagline_applet_1() {
1568
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_applet.xml');
1569
 
1570
        $feed = new XML_Feed_Parser($content, false, true);
1571
 
1572
        $this->assertEquals('safe description', $feed->tagline);
1573
    }
1574
 
1575
    function test_feed_tagline_blink_1() {
1576
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_blink.xml');
1577
 
1578
        $feed = new XML_Feed_Parser($content, false, true);
1579
 
1580
        $this->assertEquals('safe description', $feed->tagline);
1581
    }
1582
 
1583
    function test_feed_tagline_crazy_1() {
1584
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_crazy.xml');
1585
 
1586
        $feed = new XML_Feed_Parser($content, false, true);
1587
 
1588
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->tagline);
1589
    }
1590
 
1591
    function test_feed_tagline_embed_1() {
1592
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_embed.xml');
1593
 
1594
        $feed = new XML_Feed_Parser($content, false, true);
1595
 
1596
        $this->assertEquals('safe description', $feed->tagline);
1597
    }
1598
 
1599
    function test_feed_tagline_frame_1() {
1600
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_frame.xml');
1601
 
1602
        $feed = new XML_Feed_Parser($content, false, true);
1603
 
1604
        $this->assertEquals('safe description', $feed->tagline);
1605
    }
1606
 
1607
    function test_feed_tagline_iframe_1() {
1608
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_iframe.xml');
1609
 
1610
        $feed = new XML_Feed_Parser($content, false, true);
1611
 
1612
        $this->assertEquals('safe description', $feed->tagline);
1613
    }
1614
 
1615
    function test_feed_tagline_link_1() {
1616
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_link.xml');
1617
 
1618
        $feed = new XML_Feed_Parser($content, false, true);
1619
 
1620
        $this->assertEquals('safe description', $feed->tagline);
1621
    }
1622
 
1623
    function test_feed_tagline_meta_1() {
1624
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_meta.xml');
1625
 
1626
        $feed = new XML_Feed_Parser($content, false, true);
1627
 
1628
        $this->assertEquals('safe description', $feed->tagline);
1629
    }
1630
 
1631
    function test_feed_tagline_object_1() {
1632
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_object.xml');
1633
 
1634
        $feed = new XML_Feed_Parser($content, false, true);
1635
 
1636
        $this->assertEquals('safe description', $feed->tagline);
1637
    }
1638
 
1639
    function test_feed_tagline_onabort_1() {
1640
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onabort.xml');
1641
 
1642
        $feed = new XML_Feed_Parser($content, false, true);
1643
 
1644
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1645
    }
1646
 
1647
    function test_feed_tagline_onblur_1() {
1648
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onblur.xml');
1649
 
1650
        $feed = new XML_Feed_Parser($content, false, true);
1651
 
1652
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1653
    }
1654
 
1655
    function test_feed_tagline_onchange_1() {
1656
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onchange.xml');
1657
 
1658
        $feed = new XML_Feed_Parser($content, false, true);
1659
 
1660
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1661
    }
1662
 
1663
    function test_feed_tagline_onclick_1() {
1664
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onclick.xml');
1665
 
1666
        $feed = new XML_Feed_Parser($content, false, true);
1667
 
1668
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1669
    }
1670
 
1671
    function test_feed_tagline_ondblclick_1() {
1672
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_ondblclick.xml');
1673
 
1674
        $feed = new XML_Feed_Parser($content, false, true);
1675
 
1676
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1677
    }
1678
 
1679
    function test_feed_tagline_onerror_1() {
1680
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onerror.xml');
1681
 
1682
        $feed = new XML_Feed_Parser($content, false, true);
1683
 
1684
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1685
    }
1686
 
1687
    function test_feed_tagline_onfocus_1() {
1688
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onfocus.xml');
1689
 
1690
        $feed = new XML_Feed_Parser($content, false, true);
1691
 
1692
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1693
    }
1694
 
1695
    function test_feed_tagline_onkeydown_1() {
1696
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeydown.xml');
1697
 
1698
        $feed = new XML_Feed_Parser($content, false, true);
1699
 
1700
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1701
    }
1702
 
1703
    function test_feed_tagline_onkeypress_1() {
1704
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeypress.xml');
1705
 
1706
        $feed = new XML_Feed_Parser($content, false, true);
1707
 
1708
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1709
    }
1710
 
1711
    function test_feed_tagline_onkeyup_1() {
1712
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeyup.xml');
1713
 
1714
        $feed = new XML_Feed_Parser($content, false, true);
1715
 
1716
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1717
    }
1718
 
1719
    function test_feed_tagline_onload_1() {
1720
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onload.xml');
1721
 
1722
        $feed = new XML_Feed_Parser($content, false, true);
1723
 
1724
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1725
    }
1726
 
1727
    function test_feed_tagline_onmousedown_1() {
1728
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmousedown.xml');
1729
 
1730
        $feed = new XML_Feed_Parser($content, false, true);
1731
 
1732
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1733
    }
1734
 
1735
    function test_feed_tagline_onmouseout_1() {
1736
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseout.xml');
1737
 
1738
        $feed = new XML_Feed_Parser($content, false, true);
1739
 
1740
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1741
    }
1742
 
1743
    function test_feed_tagline_onmouseover_1() {
1744
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseover.xml');
1745
 
1746
        $feed = new XML_Feed_Parser($content, false, true);
1747
 
1748
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1749
    }
1750
 
1751
    function test_feed_tagline_onmouseup_1() {
1752
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseup.xml');
1753
 
1754
        $feed = new XML_Feed_Parser($content, false, true);
1755
 
1756
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1757
    }
1758
 
1759
    function test_feed_tagline_onreset_1() {
1760
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onreset.xml');
1761
 
1762
        $feed = new XML_Feed_Parser($content, false, true);
1763
 
1764
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1765
    }
1766
 
1767
    function test_feed_tagline_onresize_1() {
1768
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onresize.xml');
1769
 
1770
        $feed = new XML_Feed_Parser($content, false, true);
1771
 
1772
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1773
    }
1774
 
1775
    function test_feed_tagline_onsubmit_1() {
1776
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onsubmit.xml');
1777
 
1778
        $feed = new XML_Feed_Parser($content, false, true);
1779
 
1780
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1781
    }
1782
 
1783
    function test_feed_tagline_onunload_1() {
1784
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onunload.xml');
1785
 
1786
        $feed = new XML_Feed_Parser($content, false, true);
1787
 
1788
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline);
1789
    }
1790
 
1791
    function test_feed_tagline_script_1() {
1792
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script.xml');
1793
 
1794
        $feed = new XML_Feed_Parser($content, false, true);
1795
 
1796
        $this->assertEquals('safe description', $feed->tagline);
1797
    }
1798
 
1799
    function test_feed_tagline_script_cdata_1() {
1800
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_cdata.xml');
1801
 
1802
        $feed = new XML_Feed_Parser($content, false, true);
1803
 
1804
        $this->assertEquals('safe description', $feed->tagline);
1805
    }
1806
 
1807
    function test_feed_tagline_script_inline_1() {
1808
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_inline.xml');
1809
 
1810
        $feed = new XML_Feed_Parser($content, false, true);
1811
 
1812
        $this->assertEquals('<div>safe description</div>', $feed->tagline);
1813
    }
1814
 
1815
    function test_feed_tagline_script_map_description_1() {
1816
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_map_description.xml');
1817
 
1818
        $feed = new XML_Feed_Parser($content, false, true);
1819
 
1820
        $this->assertEquals('safe description', $feed->description);
1821
    }
1822
 
1823
    function test_feed_tagline_style_1() {
1824
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_style.xml');
1825
 
1826
        $feed = new XML_Feed_Parser($content, false, true);
1827
 
1828
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->tagline);
1829
    }
1830
 
1831
    function test_feed_title_applet_1() {
1832
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_applet.xml');
1833
 
1834
        $feed = new XML_Feed_Parser($content, false, true);
1835
 
1836
        $this->assertEquals('safe description', $feed->title);
1837
    }
1838
 
1839
    function test_feed_title_blink_1() {
1840
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_blink.xml');
1841
 
1842
        $feed = new XML_Feed_Parser($content, false, true);
1843
 
1844
        $this->assertEquals('safe description', $feed->title);
1845
    }
1846
 
1847
    function test_feed_title_crazy_1() {
1848
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_crazy.xml');
1849
 
1850
        $feed = new XML_Feed_Parser($content, false, true);
1851
 
1852
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->title);
1853
    }
1854
 
1855
    function test_feed_title_embed_1() {
1856
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_embed.xml');
1857
 
1858
        $feed = new XML_Feed_Parser($content, false, true);
1859
 
1860
        $this->assertEquals('safe description', $feed->title);
1861
    }
1862
 
1863
    function test_feed_title_frame_1() {
1864
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_frame.xml');
1865
 
1866
        $feed = new XML_Feed_Parser($content, false, true);
1867
 
1868
        $this->assertEquals('safe description', $feed->title);
1869
    }
1870
 
1871
    function test_feed_title_iframe_1() {
1872
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_iframe.xml');
1873
 
1874
        $feed = new XML_Feed_Parser($content, false, true);
1875
 
1876
        $this->assertEquals('safe description', $feed->title);
1877
    }
1878
 
1879
    function test_feed_title_link_1() {
1880
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_link.xml');
1881
 
1882
        $feed = new XML_Feed_Parser($content, false, true);
1883
 
1884
        $this->assertEquals('safe description', $feed->title);
1885
    }
1886
 
1887
    function test_feed_title_meta_1() {
1888
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_meta.xml');
1889
 
1890
        $feed = new XML_Feed_Parser($content, false, true);
1891
 
1892
        $this->assertEquals('safe description', $feed->title);
1893
    }
1894
 
1895
    function test_feed_title_object_1() {
1896
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_object.xml');
1897
 
1898
        $feed = new XML_Feed_Parser($content, false, true);
1899
 
1900
        $this->assertEquals('safe description', $feed->title);
1901
    }
1902
 
1903
    function test_feed_title_onabort_1() {
1904
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onabort.xml');
1905
 
1906
        $feed = new XML_Feed_Parser($content, false, true);
1907
 
1908
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1909
    }
1910
 
1911
    function test_feed_title_onblur_1() {
1912
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onblur.xml');
1913
 
1914
        $feed = new XML_Feed_Parser($content, false, true);
1915
 
1916
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1917
    }
1918
 
1919
    function test_feed_title_onchange_1() {
1920
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onchange.xml');
1921
 
1922
        $feed = new XML_Feed_Parser($content, false, true);
1923
 
1924
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1925
    }
1926
 
1927
    function test_feed_title_onclick_1() {
1928
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onclick.xml');
1929
 
1930
        $feed = new XML_Feed_Parser($content, false, true);
1931
 
1932
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1933
    }
1934
 
1935
    function test_feed_title_ondblclick_1() {
1936
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_ondblclick.xml');
1937
 
1938
        $feed = new XML_Feed_Parser($content, false, true);
1939
 
1940
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1941
    }
1942
 
1943
    function test_feed_title_onerror_1() {
1944
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onerror.xml');
1945
 
1946
        $feed = new XML_Feed_Parser($content, false, true);
1947
 
1948
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1949
    }
1950
 
1951
    function test_feed_title_onfocus_1() {
1952
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onfocus.xml');
1953
 
1954
        $feed = new XML_Feed_Parser($content, false, true);
1955
 
1956
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1957
    }
1958
 
1959
    function test_feed_title_onkeydown_1() {
1960
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeydown.xml');
1961
 
1962
        $feed = new XML_Feed_Parser($content, false, true);
1963
 
1964
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1965
    }
1966
 
1967
    function test_feed_title_onkeypress_1() {
1968
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeypress.xml');
1969
 
1970
        $feed = new XML_Feed_Parser($content, false, true);
1971
 
1972
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1973
    }
1974
 
1975
    function test_feed_title_onkeyup_1() {
1976
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeyup.xml');
1977
 
1978
        $feed = new XML_Feed_Parser($content, false, true);
1979
 
1980
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1981
    }
1982
 
1983
    function test_feed_title_onload_1() {
1984
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onload.xml');
1985
 
1986
        $feed = new XML_Feed_Parser($content, false, true);
1987
 
1988
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1989
    }
1990
 
1991
    function test_feed_title_onmousedown_1() {
1992
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmousedown.xml');
1993
 
1994
        $feed = new XML_Feed_Parser($content, false, true);
1995
 
1996
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
1997
    }
1998
 
1999
    function test_feed_title_onmouseout_1() {
2000
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseout.xml');
2001
 
2002
        $feed = new XML_Feed_Parser($content, false, true);
2003
 
2004
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2005
    }
2006
 
2007
    function test_feed_title_onmouseover_1() {
2008
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseover.xml');
2009
 
2010
        $feed = new XML_Feed_Parser($content, false, true);
2011
 
2012
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2013
    }
2014
 
2015
    function test_feed_title_onmouseup_1() {
2016
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseup.xml');
2017
 
2018
        $feed = new XML_Feed_Parser($content, false, true);
2019
 
2020
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2021
    }
2022
 
2023
    function test_feed_title_onreset_1() {
2024
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onreset.xml');
2025
 
2026
        $feed = new XML_Feed_Parser($content, false, true);
2027
 
2028
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2029
    }
2030
 
2031
    function test_feed_title_onresize_1() {
2032
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onresize.xml');
2033
 
2034
        $feed = new XML_Feed_Parser($content, false, true);
2035
 
2036
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2037
    }
2038
 
2039
    function test_feed_title_onsubmit_1() {
2040
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onsubmit.xml');
2041
 
2042
        $feed = new XML_Feed_Parser($content, false, true);
2043
 
2044
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2045
    }
2046
 
2047
    function test_feed_title_onunload_1() {
2048
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onunload.xml');
2049
 
2050
        $feed = new XML_Feed_Parser($content, false, true);
2051
 
2052
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title);
2053
    }
2054
 
2055
    function test_feed_title_script_1() {
2056
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script.xml');
2057
 
2058
        $feed = new XML_Feed_Parser($content, false, true);
2059
 
2060
        $this->assertEquals('safe description', $feed->title);
2061
    }
2062
 
2063
    function test_feed_title_script_cdata_1() {
2064
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script_cdata.xml');
2065
 
2066
        $feed = new XML_Feed_Parser($content, false, true);
2067
 
2068
        $this->assertEquals('safe description', $feed->title);
2069
    }
2070
 
2071
    function test_feed_title_script_inline_1() {
2072
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script_inline.xml');
2073
 
2074
        $feed = new XML_Feed_Parser($content, false, true);
2075
 
2076
        $this->assertEquals('<div>safe description</div>', $feed->title);
2077
    }
2078
 
2079
    function test_feed_title_style_1() {
2080
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_style.xml');
2081
 
2082
        $feed = new XML_Feed_Parser($content, false, true);
2083
 
2084
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->title);
2085
    }
2086
 
2087
    function test_item_body_applet_1() {
2088
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_applet.xml');
2089
 
2090
        $feed = new XML_Feed_Parser($content, false, true);
2091
 
2092
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2093
    }
2094
 
2095
    function test_item_body_blink_1() {
2096
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_blink.xml');
2097
 
2098
        $feed = new XML_Feed_Parser($content, false, true);
2099
 
2100
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2101
    }
2102
 
2103
    function test_item_body_embed_1() {
2104
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_embed.xml');
2105
 
2106
        $feed = new XML_Feed_Parser($content, false, true);
2107
 
2108
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2109
    }
2110
 
2111
    function test_item_body_frame_1() {
2112
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_frame.xml');
2113
 
2114
        $feed = new XML_Feed_Parser($content, false, true);
2115
 
2116
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2117
    }
2118
 
2119
    function test_item_body_iframe_1() {
2120
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_iframe.xml');
2121
 
2122
        $feed = new XML_Feed_Parser($content, false, true);
2123
 
2124
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2125
    }
2126
 
2127
    function test_item_body_link_1() {
2128
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_link.xml');
2129
 
2130
        $feed = new XML_Feed_Parser($content, false, true);
2131
 
2132
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2133
    }
2134
 
2135
    function test_item_body_meta_1() {
2136
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_meta.xml');
2137
 
2138
        $feed = new XML_Feed_Parser($content, false, true);
2139
 
2140
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2141
    }
2142
 
2143
    function test_item_body_object_1() {
2144
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_object.xml');
2145
 
2146
        $feed = new XML_Feed_Parser($content, false, true);
2147
 
2148
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2149
    }
2150
 
2151
    function test_item_body_onabort_1() {
2152
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onabort.xml');
2153
 
2154
        $feed = new XML_Feed_Parser($content, false, true);
2155
 
2156
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2157
    }
2158
 
2159
    function test_item_body_onblur_1() {
2160
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onblur.xml');
2161
 
2162
        $feed = new XML_Feed_Parser($content, false, true);
2163
 
2164
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2165
    }
2166
 
2167
    function test_item_body_onchange_1() {
2168
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onchange.xml');
2169
 
2170
        $feed = new XML_Feed_Parser($content, false, true);
2171
 
2172
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2173
    }
2174
 
2175
    function test_item_body_onclick_1() {
2176
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onclick.xml');
2177
 
2178
        $feed = new XML_Feed_Parser($content, false, true);
2179
 
2180
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2181
    }
2182
 
2183
    function test_item_body_ondblclick_1() {
2184
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_ondblclick.xml');
2185
 
2186
        $feed = new XML_Feed_Parser($content, false, true);
2187
 
2188
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2189
    }
2190
 
2191
    function test_item_body_onerror_1() {
2192
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onerror.xml');
2193
 
2194
        $feed = new XML_Feed_Parser($content, false, true);
2195
 
2196
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2197
    }
2198
 
2199
    function test_item_body_onfocus_1() {
2200
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onfocus.xml');
2201
 
2202
        $feed = new XML_Feed_Parser($content, false, true);
2203
 
2204
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2205
    }
2206
 
2207
    function test_item_body_onkeydown_1() {
2208
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeydown.xml');
2209
 
2210
        $feed = new XML_Feed_Parser($content, false, true);
2211
 
2212
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2213
    }
2214
 
2215
    function test_item_body_onkeypress_1() {
2216
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeypress.xml');
2217
 
2218
        $feed = new XML_Feed_Parser($content, false, true);
2219
 
2220
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2221
    }
2222
 
2223
    function test_item_body_onkeyup_1() {
2224
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeyup.xml');
2225
 
2226
        $feed = new XML_Feed_Parser($content, false, true);
2227
 
2228
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2229
    }
2230
 
2231
    function test_item_body_onload_1() {
2232
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onload.xml');
2233
 
2234
        $feed = new XML_Feed_Parser($content, false, true);
2235
 
2236
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2237
    }
2238
 
2239
    function test_item_body_onmousedown_1() {
2240
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmousedown.xml');
2241
 
2242
        $feed = new XML_Feed_Parser($content, false, true);
2243
 
2244
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2245
    }
2246
 
2247
    function test_item_body_onmouseout_1() {
2248
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseout.xml');
2249
 
2250
        $feed = new XML_Feed_Parser($content, false, true);
2251
 
2252
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2253
    }
2254
 
2255
    function test_item_body_onmouseover_1() {
2256
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseover.xml');
2257
 
2258
        $feed = new XML_Feed_Parser($content, false, true);
2259
 
2260
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2261
    }
2262
 
2263
    function test_item_body_onmouseup_1() {
2264
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseup.xml');
2265
 
2266
        $feed = new XML_Feed_Parser($content, false, true);
2267
 
2268
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2269
    }
2270
 
2271
    function test_item_body_onreset_1() {
2272
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onreset.xml');
2273
 
2274
        $feed = new XML_Feed_Parser($content, false, true);
2275
 
2276
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2277
    }
2278
 
2279
    function test_item_body_onresize_1() {
2280
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onresize.xml');
2281
 
2282
        $feed = new XML_Feed_Parser($content, false, true);
2283
 
2284
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2285
    }
2286
 
2287
    function test_item_body_onsubmit_1() {
2288
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onsubmit.xml');
2289
 
2290
        $feed = new XML_Feed_Parser($content, false, true);
2291
 
2292
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2293
    }
2294
 
2295
    function test_item_body_onunload_1() {
2296
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onunload.xml');
2297
 
2298
        $feed = new XML_Feed_Parser($content, false, true);
2299
 
2300
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2301
    }
2302
 
2303
    function test_item_body_script_1() {
2304
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_script.xml');
2305
 
2306
        $feed = new XML_Feed_Parser($content, false, true);
2307
 
2308
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2309
    }
2310
 
2311
    function test_item_body_script_map_content_1() {
2312
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_script_map_content.xml');
2313
 
2314
        $feed = new XML_Feed_Parser($content, false, true);
2315
 
2316
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
2317
    }
2318
 
2319
    function test_item_body_style_1() {
2320
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_style.xml');
2321
 
2322
        $feed = new XML_Feed_Parser($content, false, true);
2323
 
2324
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description);
2325
    }
2326
 
2327
    function test_item_content_encoded_applet_1() {
2328
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_applet.xml');
2329
 
2330
        $feed = new XML_Feed_Parser($content, false, true);
2331
 
2332
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2333
    }
2334
 
2335
    function test_item_content_encoded_blink_1() {
2336
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_blink.xml');
2337
 
2338
        $feed = new XML_Feed_Parser($content, false, true);
2339
 
2340
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2341
    }
2342
 
2343
    function test_item_content_encoded_crazy_1() {
2344
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_crazy.xml');
2345
 
2346
        $feed = new XML_Feed_Parser($content, false, true);
2347
 
2348
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->description);
2349
    }
2350
 
2351
    function test_item_content_encoded_embed_1() {
2352
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_embed.xml');
2353
 
2354
        $feed = new XML_Feed_Parser($content, false, true);
2355
 
2356
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2357
    }
2358
 
2359
    function test_item_content_encoded_frame_1() {
2360
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_frame.xml');
2361
 
2362
        $feed = new XML_Feed_Parser($content, false, true);
2363
 
2364
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2365
    }
2366
 
2367
    function test_item_content_encoded_iframe_1() {
2368
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_iframe.xml');
2369
 
2370
        $feed = new XML_Feed_Parser($content, false, true);
2371
 
2372
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2373
    }
2374
 
2375
    function test_item_content_encoded_link_1() {
2376
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_link.xml');
2377
 
2378
        $feed = new XML_Feed_Parser($content, false, true);
2379
 
2380
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2381
    }
2382
 
2383
    function test_item_content_encoded_map_content_1() {
2384
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_map_content.xml');
2385
 
2386
        $feed = new XML_Feed_Parser($content, false, true);
2387
 
2388
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
2389
    }
2390
 
2391
    function test_item_content_encoded_meta_1() {
2392
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_meta.xml');
2393
 
2394
        $feed = new XML_Feed_Parser($content, false, true);
2395
 
2396
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2397
    }
2398
 
2399
    function test_item_content_encoded_object_1() {
2400
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_object.xml');
2401
 
2402
        $feed = new XML_Feed_Parser($content, false, true);
2403
 
2404
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2405
    }
2406
 
2407
    function test_item_content_encoded_onabort_1() {
2408
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onabort.xml');
2409
 
2410
        $feed = new XML_Feed_Parser($content, false, true);
2411
 
2412
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2413
    }
2414
 
2415
    function test_item_content_encoded_onblur_1() {
2416
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onblur.xml');
2417
 
2418
        $feed = new XML_Feed_Parser($content, false, true);
2419
 
2420
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2421
    }
2422
 
2423
    function test_item_content_encoded_onchange_1() {
2424
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onchange.xml');
2425
 
2426
        $feed = new XML_Feed_Parser($content, false, true);
2427
 
2428
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2429
    }
2430
 
2431
    function test_item_content_encoded_onclick_1() {
2432
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onclick.xml');
2433
 
2434
        $feed = new XML_Feed_Parser($content, false, true);
2435
 
2436
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2437
    }
2438
 
2439
    function test_item_content_encoded_ondblclick_1() {
2440
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_ondblclick.xml');
2441
 
2442
        $feed = new XML_Feed_Parser($content, false, true);
2443
 
2444
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2445
    }
2446
 
2447
    function test_item_content_encoded_onerror_1() {
2448
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onerror.xml');
2449
 
2450
        $feed = new XML_Feed_Parser($content, false, true);
2451
 
2452
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2453
    }
2454
 
2455
    function test_item_content_encoded_onfocus_1() {
2456
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onfocus.xml');
2457
 
2458
        $feed = new XML_Feed_Parser($content, false, true);
2459
 
2460
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2461
    }
2462
 
2463
    function test_item_content_encoded_onkeydown_1() {
2464
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeydown.xml');
2465
 
2466
        $feed = new XML_Feed_Parser($content, false, true);
2467
 
2468
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2469
    }
2470
 
2471
    function test_item_content_encoded_onkeypress_1() {
2472
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeypress.xml');
2473
 
2474
        $feed = new XML_Feed_Parser($content, false, true);
2475
 
2476
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2477
    }
2478
 
2479
    function test_item_content_encoded_onkeyup_1() {
2480
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeyup.xml');
2481
 
2482
        $feed = new XML_Feed_Parser($content, false, true);
2483
 
2484
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2485
    }
2486
 
2487
    function test_item_content_encoded_onload_1() {
2488
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onload.xml');
2489
 
2490
        $feed = new XML_Feed_Parser($content, false, true);
2491
 
2492
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2493
    }
2494
 
2495
    function test_item_content_encoded_onmousedown_1() {
2496
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmousedown.xml');
2497
 
2498
        $feed = new XML_Feed_Parser($content, false, true);
2499
 
2500
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2501
    }
2502
 
2503
    function test_item_content_encoded_onmouseout_1() {
2504
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseout.xml');
2505
 
2506
        $feed = new XML_Feed_Parser($content, false, true);
2507
 
2508
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2509
    }
2510
 
2511
    function test_item_content_encoded_onmouseover_1() {
2512
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseover.xml');
2513
 
2514
        $feed = new XML_Feed_Parser($content, false, true);
2515
 
2516
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2517
    }
2518
 
2519
    function test_item_content_encoded_onmouseup_1() {
2520
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseup.xml');
2521
 
2522
        $feed = new XML_Feed_Parser($content, false, true);
2523
 
2524
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2525
    }
2526
 
2527
    function test_item_content_encoded_onreset_1() {
2528
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onreset.xml');
2529
 
2530
        $feed = new XML_Feed_Parser($content, false, true);
2531
 
2532
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2533
    }
2534
 
2535
    function test_item_content_encoded_onresize_1() {
2536
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onresize.xml');
2537
 
2538
        $feed = new XML_Feed_Parser($content, false, true);
2539
 
2540
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2541
    }
2542
 
2543
    function test_item_content_encoded_onsubmit_1() {
2544
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onsubmit.xml');
2545
 
2546
        $feed = new XML_Feed_Parser($content, false, true);
2547
 
2548
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2549
    }
2550
 
2551
    function test_item_content_encoded_onunload_1() {
2552
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onunload.xml');
2553
 
2554
        $feed = new XML_Feed_Parser($content, false, true);
2555
 
2556
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2557
    }
2558
 
2559
    function test_item_content_encoded_script_1() {
2560
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script.xml');
2561
 
2562
        $feed = new XML_Feed_Parser($content, false, true);
2563
 
2564
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2565
    }
2566
 
2567
    function test_item_content_encoded_script_cdata_1() {
2568
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script_cdata.xml');
2569
 
2570
        $feed = new XML_Feed_Parser($content, false, true);
2571
 
2572
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2573
    }
2574
 
2575
    function test_item_content_encoded_script_map_content_1() {
2576
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script_map_content.xml');
2577
 
2578
        $feed = new XML_Feed_Parser($content, false, true);
2579
 
2580
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
2581
    }
2582
 
2583
    function test_item_content_encoded_style_1() {
2584
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_style.xml');
2585
 
2586
        $feed = new XML_Feed_Parser($content, false, true);
2587
 
2588
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description);
2589
    }
2590
 
2591
    function test_item_description_applet_1() {
2592
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_applet.xml');
2593
 
2594
        $feed = new XML_Feed_Parser($content, false, true);
2595
 
2596
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2597
    }
2598
 
2599
    function test_item_description_blink_1() {
2600
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_blink.xml');
2601
 
2602
        $feed = new XML_Feed_Parser($content, false, true);
2603
 
2604
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2605
    }
2606
 
2607
    function test_item_description_crazy_1() {
2608
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_crazy.xml');
2609
 
2610
        $feed = new XML_Feed_Parser($content, false, true);
2611
 
2612
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->description);
2613
    }
2614
 
2615
    function test_item_description_embed_1() {
2616
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_embed.xml');
2617
 
2618
        $feed = new XML_Feed_Parser($content, false, true);
2619
 
2620
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2621
    }
2622
 
2623
    function test_item_description_frame_1() {
2624
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_frame.xml');
2625
 
2626
        $feed = new XML_Feed_Parser($content, false, true);
2627
 
2628
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2629
    }
2630
 
2631
    function test_item_description_iframe_1() {
2632
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_iframe.xml');
2633
 
2634
        $feed = new XML_Feed_Parser($content, false, true);
2635
 
2636
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2637
    }
2638
 
2639
    function test_item_description_link_1() {
2640
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_link.xml');
2641
 
2642
        $feed = new XML_Feed_Parser($content, false, true);
2643
 
2644
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2645
    }
2646
 
2647
    function test_item_description_meta_1() {
2648
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_meta.xml');
2649
 
2650
        $feed = new XML_Feed_Parser($content, false, true);
2651
 
2652
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2653
    }
2654
 
2655
    function test_item_description_object_1() {
2656
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_object.xml');
2657
 
2658
        $feed = new XML_Feed_Parser($content, false, true);
2659
 
2660
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2661
    }
2662
 
2663
    function test_item_description_onabort_1() {
2664
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onabort.xml');
2665
 
2666
        $feed = new XML_Feed_Parser($content, false, true);
2667
 
2668
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2669
    }
2670
 
2671
    function test_item_description_onblur_1() {
2672
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onblur.xml');
2673
 
2674
        $feed = new XML_Feed_Parser($content, false, true);
2675
 
2676
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2677
    }
2678
 
2679
    function test_item_description_onchange_1() {
2680
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onchange.xml');
2681
 
2682
        $feed = new XML_Feed_Parser($content, false, true);
2683
 
2684
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2685
    }
2686
 
2687
    function test_item_description_onclick_1() {
2688
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onclick.xml');
2689
 
2690
        $feed = new XML_Feed_Parser($content, false, true);
2691
 
2692
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2693
    }
2694
 
2695
    function test_item_description_ondblclick_1() {
2696
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_ondblclick.xml');
2697
 
2698
        $feed = new XML_Feed_Parser($content, false, true);
2699
 
2700
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2701
    }
2702
 
2703
    function test_item_description_onerror_1() {
2704
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onerror.xml');
2705
 
2706
        $feed = new XML_Feed_Parser($content, false, true);
2707
 
2708
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2709
    }
2710
 
2711
    function test_item_description_onfocus_1() {
2712
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onfocus.xml');
2713
 
2714
        $feed = new XML_Feed_Parser($content, false, true);
2715
 
2716
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2717
    }
2718
 
2719
    function test_item_description_onkeydown_1() {
2720
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeydown.xml');
2721
 
2722
        $feed = new XML_Feed_Parser($content, false, true);
2723
 
2724
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2725
    }
2726
 
2727
    function test_item_description_onkeypress_1() {
2728
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeypress.xml');
2729
 
2730
        $feed = new XML_Feed_Parser($content, false, true);
2731
 
2732
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2733
    }
2734
 
2735
    function test_item_description_onkeyup_1() {
2736
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeyup.xml');
2737
 
2738
        $feed = new XML_Feed_Parser($content, false, true);
2739
 
2740
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2741
    }
2742
 
2743
    function test_item_description_onload_1() {
2744
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onload.xml');
2745
 
2746
        $feed = new XML_Feed_Parser($content, false, true);
2747
 
2748
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2749
    }
2750
 
2751
    function test_item_description_onmousedown_1() {
2752
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmousedown.xml');
2753
 
2754
        $feed = new XML_Feed_Parser($content, false, true);
2755
 
2756
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2757
    }
2758
 
2759
    function test_item_description_onmouseout_1() {
2760
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseout.xml');
2761
 
2762
        $feed = new XML_Feed_Parser($content, false, true);
2763
 
2764
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2765
    }
2766
 
2767
    function test_item_description_onmouseover_1() {
2768
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseover.xml');
2769
 
2770
        $feed = new XML_Feed_Parser($content, false, true);
2771
 
2772
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2773
    }
2774
 
2775
    function test_item_description_onmouseup_1() {
2776
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseup.xml');
2777
 
2778
        $feed = new XML_Feed_Parser($content, false, true);
2779
 
2780
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2781
    }
2782
 
2783
    function test_item_description_onreset_1() {
2784
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onreset.xml');
2785
 
2786
        $feed = new XML_Feed_Parser($content, false, true);
2787
 
2788
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2789
    }
2790
 
2791
    function test_item_description_onresize_1() {
2792
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onresize.xml');
2793
 
2794
        $feed = new XML_Feed_Parser($content, false, true);
2795
 
2796
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2797
    }
2798
 
2799
    function test_item_description_onsubmit_1() {
2800
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onsubmit.xml');
2801
 
2802
        $feed = new XML_Feed_Parser($content, false, true);
2803
 
2804
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2805
    }
2806
 
2807
    function test_item_description_onunload_1() {
2808
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onunload.xml');
2809
 
2810
        $feed = new XML_Feed_Parser($content, false, true);
2811
 
2812
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2813
    }
2814
 
2815
    function test_item_description_script_1() {
2816
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script.xml');
2817
 
2818
        $feed = new XML_Feed_Parser($content, false, true);
2819
 
2820
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2821
    }
2822
 
2823
    function test_item_description_script_cdata_1() {
2824
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script_cdata.xml');
2825
 
2826
        $feed = new XML_Feed_Parser($content, false, true);
2827
 
2828
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2829
    }
2830
 
2831
    function test_item_description_script_map_summary_1() {
2832
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script_map_summary.xml');
2833
 
2834
        $feed = new XML_Feed_Parser($content, false, true);
2835
 
2836
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary);
2837
    }
2838
 
2839
    function test_item_description_style_1() {
2840
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_style.xml');
2841
 
2842
        $feed = new XML_Feed_Parser($content, false, true);
2843
 
2844
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description);
2845
    }
2846
 
2847
    function test_item_fullitem_applet_1() {
2848
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_applet.xml');
2849
 
2850
        $feed = new XML_Feed_Parser($content, false, true);
2851
 
2852
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2853
    }
2854
 
2855
    function test_item_fullitem_blink_1() {
2856
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_blink.xml');
2857
 
2858
        $feed = new XML_Feed_Parser($content, false, true);
2859
 
2860
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2861
    }
2862
 
2863
    function test_item_fullitem_crazy_1() {
2864
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_crazy.xml');
2865
 
2866
        $feed = new XML_Feed_Parser($content, false, true);
2867
 
2868
        $this->assertEquals('Crazy HTML -' + '- Can Your Regex Parse This?\n\n\n\n<!-' + '- <script> -' + '->\n\n<!-' + '- \n\t<script> \n-' + '->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>', $feed->getEntryByOffset(0)->description);
2869
    }
2870
 
2871
    function test_item_fullitem_embed_1() {
2872
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_embed.xml');
2873
 
2874
        $feed = new XML_Feed_Parser($content, false, true);
2875
 
2876
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2877
    }
2878
 
2879
    function test_item_fullitem_frame_1() {
2880
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_frame.xml');
2881
 
2882
        $feed = new XML_Feed_Parser($content, false, true);
2883
 
2884
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2885
    }
2886
 
2887
    function test_item_fullitem_iframe_1() {
2888
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_iframe.xml');
2889
 
2890
        $feed = new XML_Feed_Parser($content, false, true);
2891
 
2892
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2893
    }
2894
 
2895
    function test_item_fullitem_link_1() {
2896
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_link.xml');
2897
 
2898
        $feed = new XML_Feed_Parser($content, false, true);
2899
 
2900
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2901
    }
2902
 
2903
    function test_item_fullitem_meta_1() {
2904
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_meta.xml');
2905
 
2906
        $feed = new XML_Feed_Parser($content, false, true);
2907
 
2908
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2909
    }
2910
 
2911
    function test_item_fullitem_object_1() {
2912
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_object.xml');
2913
 
2914
        $feed = new XML_Feed_Parser($content, false, true);
2915
 
2916
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
2917
    }
2918
 
2919
    function test_item_fullitem_onabort_1() {
2920
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onabort.xml');
2921
 
2922
        $feed = new XML_Feed_Parser($content, false, true);
2923
 
2924
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2925
    }
2926
 
2927
    function test_item_fullitem_onblur_1() {
2928
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onblur.xml');
2929
 
2930
        $feed = new XML_Feed_Parser($content, false, true);
2931
 
2932
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2933
    }
2934
 
2935
    function test_item_fullitem_onchange_1() {
2936
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onchange.xml');
2937
 
2938
        $feed = new XML_Feed_Parser($content, false, true);
2939
 
2940
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2941
    }
2942
 
2943
    function test_item_fullitem_onclick_1() {
2944
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onclick.xml');
2945
 
2946
        $feed = new XML_Feed_Parser($content, false, true);
2947
 
2948
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2949
    }
2950
 
2951
    function test_item_fullitem_ondblclick_1() {
2952
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_ondblclick.xml');
2953
 
2954
        $feed = new XML_Feed_Parser($content, false, true);
2955
 
2956
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2957
    }
2958
 
2959
    function test_item_fullitem_onerror_1() {
2960
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onerror.xml');
2961
 
2962
        $feed = new XML_Feed_Parser($content, false, true);
2963
 
2964
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2965
    }
2966
 
2967
    function test_item_fullitem_onfocus_1() {
2968
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onfocus.xml');
2969
 
2970
        $feed = new XML_Feed_Parser($content, false, true);
2971
 
2972
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2973
    }
2974
 
2975
    function test_item_fullitem_onkeydown_1() {
2976
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeydown.xml');
2977
 
2978
        $feed = new XML_Feed_Parser($content, false, true);
2979
 
2980
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2981
    }
2982
 
2983
    function test_item_fullitem_onkeypress_1() {
2984
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeypress.xml');
2985
 
2986
        $feed = new XML_Feed_Parser($content, false, true);
2987
 
2988
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2989
    }
2990
 
2991
    function test_item_fullitem_onkeyup_1() {
2992
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeyup.xml');
2993
 
2994
        $feed = new XML_Feed_Parser($content, false, true);
2995
 
2996
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
2997
    }
2998
 
2999
    function test_item_fullitem_onload_1() {
3000
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onload.xml');
3001
 
3002
        $feed = new XML_Feed_Parser($content, false, true);
3003
 
3004
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3005
    }
3006
 
3007
    function test_item_fullitem_onmousedown_1() {
3008
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmousedown.xml');
3009
 
3010
        $feed = new XML_Feed_Parser($content, false, true);
3011
 
3012
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3013
    }
3014
 
3015
    function test_item_fullitem_onmouseout_1() {
3016
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseout.xml');
3017
 
3018
        $feed = new XML_Feed_Parser($content, false, true);
3019
 
3020
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3021
    }
3022
 
3023
    function test_item_fullitem_onmouseover_1() {
3024
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseover.xml');
3025
 
3026
        $feed = new XML_Feed_Parser($content, false, true);
3027
 
3028
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3029
    }
3030
 
3031
    function test_item_fullitem_onmouseup_1() {
3032
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseup.xml');
3033
 
3034
        $feed = new XML_Feed_Parser($content, false, true);
3035
 
3036
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3037
    }
3038
 
3039
    function test_item_fullitem_onreset_1() {
3040
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onreset.xml');
3041
 
3042
        $feed = new XML_Feed_Parser($content, false, true);
3043
 
3044
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3045
    }
3046
 
3047
    function test_item_fullitem_onresize_1() {
3048
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onresize.xml');
3049
 
3050
        $feed = new XML_Feed_Parser($content, false, true);
3051
 
3052
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3053
    }
3054
 
3055
    function test_item_fullitem_onsubmit_1() {
3056
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onsubmit.xml');
3057
 
3058
        $feed = new XML_Feed_Parser($content, false, true);
3059
 
3060
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3061
    }
3062
 
3063
    function test_item_fullitem_onunload_1() {
3064
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onunload.xml');
3065
 
3066
        $feed = new XML_Feed_Parser($content, false, true);
3067
 
3068
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3069
    }
3070
 
3071
    function test_item_fullitem_script_1() {
3072
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script.xml');
3073
 
3074
        $feed = new XML_Feed_Parser($content, false, true);
3075
 
3076
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3077
    }
3078
 
3079
    function test_item_fullitem_script_cdata_1() {
3080
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script_cdata.xml');
3081
 
3082
        $feed = new XML_Feed_Parser($content, false, true);
3083
 
3084
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3085
    }
3086
 
3087
    function test_item_fullitem_script_map_summary_1() {
3088
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script_map_summary.xml');
3089
 
3090
        $feed = new XML_Feed_Parser($content, false, true);
3091
 
3092
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
3093
    }
3094
 
3095
    function test_item_fullitem_style_1() {
3096
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_style.xml');
3097
 
3098
        $feed = new XML_Feed_Parser($content, false, true);
3099
 
3100
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description);
3101
    }
3102
 
3103
    function test_item_xhtml_body_applet_1() {
3104
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_applet.xml');
3105
 
3106
        $feed = new XML_Feed_Parser($content, false, true);
3107
 
3108
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3109
    }
3110
 
3111
    function test_item_xhtml_body_blink_1() {
3112
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_blink.xml');
3113
 
3114
        $feed = new XML_Feed_Parser($content, false, true);
3115
 
3116
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3117
    }
3118
 
3119
    function test_item_xhtml_body_embed_1() {
3120
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_embed.xml');
3121
 
3122
        $feed = new XML_Feed_Parser($content, false, true);
3123
 
3124
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3125
    }
3126
 
3127
    function test_item_xhtml_body_frame_1() {
3128
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_frame.xml');
3129
 
3130
        $feed = new XML_Feed_Parser($content, false, true);
3131
 
3132
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3133
    }
3134
 
3135
    function test_item_xhtml_body_iframe_1() {
3136
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_iframe.xml');
3137
 
3138
        $feed = new XML_Feed_Parser($content, false, true);
3139
 
3140
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3141
    }
3142
 
3143
    function test_item_xhtml_body_link_1() {
3144
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_link.xml');
3145
 
3146
        $feed = new XML_Feed_Parser($content, false, true);
3147
 
3148
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3149
    }
3150
 
3151
    function test_item_xhtml_body_meta_1() {
3152
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_meta.xml');
3153
 
3154
        $feed = new XML_Feed_Parser($content, false, true);
3155
 
3156
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3157
    }
3158
 
3159
    function test_item_xhtml_body_object_1() {
3160
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_object.xml');
3161
 
3162
        $feed = new XML_Feed_Parser($content, false, true);
3163
 
3164
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3165
    }
3166
 
3167
    function test_item_xhtml_body_onabort_1() {
3168
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onabort.xml');
3169
 
3170
        $feed = new XML_Feed_Parser($content, false, true);
3171
 
3172
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3173
    }
3174
 
3175
    function test_item_xhtml_body_onblur_1() {
3176
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onblur.xml');
3177
 
3178
        $feed = new XML_Feed_Parser($content, false, true);
3179
 
3180
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3181
    }
3182
 
3183
    function test_item_xhtml_body_onchange_1() {
3184
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onchange.xml');
3185
 
3186
        $feed = new XML_Feed_Parser($content, false, true);
3187
 
3188
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3189
    }
3190
 
3191
    function test_item_xhtml_body_onclick_1() {
3192
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onclick.xml');
3193
 
3194
        $feed = new XML_Feed_Parser($content, false, true);
3195
 
3196
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3197
    }
3198
 
3199
    function test_item_xhtml_body_ondblclick_1() {
3200
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_ondblclick.xml');
3201
 
3202
        $feed = new XML_Feed_Parser($content, false, true);
3203
 
3204
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3205
    }
3206
 
3207
    function test_item_xhtml_body_onerror_1() {
3208
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onerror.xml');
3209
 
3210
        $feed = new XML_Feed_Parser($content, false, true);
3211
 
3212
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3213
    }
3214
 
3215
    function test_item_xhtml_body_onfocus_1() {
3216
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onfocus.xml');
3217
 
3218
        $feed = new XML_Feed_Parser($content, false, true);
3219
 
3220
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3221
    }
3222
 
3223
    function test_item_xhtml_body_onkeydown_1() {
3224
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeydown.xml');
3225
 
3226
        $feed = new XML_Feed_Parser($content, false, true);
3227
 
3228
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3229
    }
3230
 
3231
    function test_item_xhtml_body_onkeypress_1() {
3232
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeypress.xml');
3233
 
3234
        $feed = new XML_Feed_Parser($content, false, true);
3235
 
3236
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3237
    }
3238
 
3239
    function test_item_xhtml_body_onkeyup_1() {
3240
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeyup.xml');
3241
 
3242
        $feed = new XML_Feed_Parser($content, false, true);
3243
 
3244
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3245
    }
3246
 
3247
    function test_item_xhtml_body_onload_1() {
3248
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onload.xml');
3249
 
3250
        $feed = new XML_Feed_Parser($content, false, true);
3251
 
3252
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3253
    }
3254
 
3255
    function test_item_xhtml_body_onmousedown_1() {
3256
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmousedown.xml');
3257
 
3258
        $feed = new XML_Feed_Parser($content, false, true);
3259
 
3260
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3261
    }
3262
 
3263
    function test_item_xhtml_body_onmouseout_1() {
3264
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseout.xml');
3265
 
3266
        $feed = new XML_Feed_Parser($content, false, true);
3267
 
3268
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3269
    }
3270
 
3271
    function test_item_xhtml_body_onmouseover_1() {
3272
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseover.xml');
3273
 
3274
        $feed = new XML_Feed_Parser($content, false, true);
3275
 
3276
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3277
    }
3278
 
3279
    function test_item_xhtml_body_onmouseup_1() {
3280
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseup.xml');
3281
 
3282
        $feed = new XML_Feed_Parser($content, false, true);
3283
 
3284
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3285
    }
3286
 
3287
    function test_item_xhtml_body_onreset_1() {
3288
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onreset.xml');
3289
 
3290
        $feed = new XML_Feed_Parser($content, false, true);
3291
 
3292
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3293
    }
3294
 
3295
    function test_item_xhtml_body_onresize_1() {
3296
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onresize.xml');
3297
 
3298
        $feed = new XML_Feed_Parser($content, false, true);
3299
 
3300
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3301
    }
3302
 
3303
    function test_item_xhtml_body_onsubmit_1() {
3304
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onsubmit.xml');
3305
 
3306
        $feed = new XML_Feed_Parser($content, false, true);
3307
 
3308
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3309
    }
3310
 
3311
    function test_item_xhtml_body_onunload_1() {
3312
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onunload.xml');
3313
 
3314
        $feed = new XML_Feed_Parser($content, false, true);
3315
 
3316
        $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description);
3317
    }
3318
 
3319
    function test_item_xhtml_body_script_1() {
3320
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_script.xml');
3321
 
3322
        $feed = new XML_Feed_Parser($content, false, true);
3323
 
3324
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description);
3325
    }
3326
 
3327
    function test_item_xhtml_body_script_map_content_1() {
3328
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_script_map_content.xml');
3329
 
3330
        $feed = new XML_Feed_Parser($content, false, true);
3331
 
3332
        $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value'));
3333
    }
3334
 
3335
    function test_item_xhtml_body_style_1() {
3336
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_style.xml');
3337
 
3338
        $feed = new XML_Feed_Parser($content, false, true);
3339
 
3340
        $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description);
3341
    }
3342
}
3343
 
3344
?>