1 | <?php |
---|
2 | |
---|
3 | require_once '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 | try { |
---|
10 | $feed = new XML_Feed_Parser($content); |
---|
11 | } catch (XML_Feed_Parser_Exception $e) { |
---|
12 | $this->assertTrue(false); |
---|
13 | return; |
---|
14 | } |
---|
15 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
16 | } |
---|
17 | |
---|
18 | function test_entry_content_blink_1 () { |
---|
19 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_blink.xml'); |
---|
20 | try { |
---|
21 | $feed = new XML_Feed_Parser($content); |
---|
22 | } catch (XML_Feed_Parser_Exception $e) { |
---|
23 | $this->assertTrue(false); |
---|
24 | return; |
---|
25 | } |
---|
26 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
27 | } |
---|
28 | |
---|
29 | function test_entry_content_crazy_1 () { |
---|
30 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_crazy.xml'); |
---|
31 | try { |
---|
32 | $feed = new XML_Feed_Parser($content); |
---|
33 | } catch (XML_Feed_Parser_Exception $e) { |
---|
34 | $this->assertTrue(false); |
---|
35 | return; |
---|
36 | } |
---|
37 | $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')); |
---|
38 | } |
---|
39 | |
---|
40 | function test_entry_content_embed_1 () { |
---|
41 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_embed.xml'); |
---|
42 | try { |
---|
43 | $feed = new XML_Feed_Parser($content); |
---|
44 | } catch (XML_Feed_Parser_Exception $e) { |
---|
45 | $this->assertTrue(false); |
---|
46 | return; |
---|
47 | } |
---|
48 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
49 | } |
---|
50 | |
---|
51 | function test_entry_content_frame_1 () { |
---|
52 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_frame.xml'); |
---|
53 | try { |
---|
54 | $feed = new XML_Feed_Parser($content); |
---|
55 | } catch (XML_Feed_Parser_Exception $e) { |
---|
56 | $this->assertTrue(false); |
---|
57 | return; |
---|
58 | } |
---|
59 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
60 | } |
---|
61 | |
---|
62 | function test_entry_content_iframe_1 () { |
---|
63 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_iframe.xml'); |
---|
64 | try { |
---|
65 | $feed = new XML_Feed_Parser($content); |
---|
66 | } catch (XML_Feed_Parser_Exception $e) { |
---|
67 | $this->assertTrue(false); |
---|
68 | return; |
---|
69 | } |
---|
70 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
71 | } |
---|
72 | |
---|
73 | function test_entry_content_link_1 () { |
---|
74 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_link.xml'); |
---|
75 | try { |
---|
76 | $feed = new XML_Feed_Parser($content); |
---|
77 | } catch (XML_Feed_Parser_Exception $e) { |
---|
78 | $this->assertTrue(false); |
---|
79 | return; |
---|
80 | } |
---|
81 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
82 | } |
---|
83 | |
---|
84 | function test_entry_content_meta_1 () { |
---|
85 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_meta.xml'); |
---|
86 | try { |
---|
87 | $feed = new XML_Feed_Parser($content); |
---|
88 | } catch (XML_Feed_Parser_Exception $e) { |
---|
89 | $this->assertTrue(false); |
---|
90 | return; |
---|
91 | } |
---|
92 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
93 | } |
---|
94 | |
---|
95 | function test_entry_content_object_1 () { |
---|
96 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_object.xml'); |
---|
97 | try { |
---|
98 | $feed = new XML_Feed_Parser($content); |
---|
99 | } catch (XML_Feed_Parser_Exception $e) { |
---|
100 | $this->assertTrue(false); |
---|
101 | return; |
---|
102 | } |
---|
103 | $this->assertEquals('safe <b>description</b>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
104 | } |
---|
105 | |
---|
106 | function test_entry_content_onabort_1 () { |
---|
107 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onabort.xml'); |
---|
108 | try { |
---|
109 | $feed = new XML_Feed_Parser($content); |
---|
110 | } catch (XML_Feed_Parser_Exception $e) { |
---|
111 | $this->assertTrue(false); |
---|
112 | return; |
---|
113 | } |
---|
114 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
115 | } |
---|
116 | |
---|
117 | function test_entry_content_onblur_1 () { |
---|
118 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onblur.xml'); |
---|
119 | try { |
---|
120 | $feed = new XML_Feed_Parser($content); |
---|
121 | } catch (XML_Feed_Parser_Exception $e) { |
---|
122 | $this->assertTrue(false); |
---|
123 | return; |
---|
124 | } |
---|
125 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
126 | } |
---|
127 | |
---|
128 | function test_entry_content_onchange_1 () { |
---|
129 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onchange.xml'); |
---|
130 | try { |
---|
131 | $feed = new XML_Feed_Parser($content); |
---|
132 | } catch (XML_Feed_Parser_Exception $e) { |
---|
133 | $this->assertTrue(false); |
---|
134 | return; |
---|
135 | } |
---|
136 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
137 | } |
---|
138 | |
---|
139 | function test_entry_content_onclick_1 () { |
---|
140 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onclick.xml'); |
---|
141 | try { |
---|
142 | $feed = new XML_Feed_Parser($content); |
---|
143 | } catch (XML_Feed_Parser_Exception $e) { |
---|
144 | $this->assertTrue(false); |
---|
145 | return; |
---|
146 | } |
---|
147 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
148 | } |
---|
149 | |
---|
150 | function test_entry_content_ondblclick_1 () { |
---|
151 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_ondblclick.xml'); |
---|
152 | try { |
---|
153 | $feed = new XML_Feed_Parser($content); |
---|
154 | } catch (XML_Feed_Parser_Exception $e) { |
---|
155 | $this->assertTrue(false); |
---|
156 | return; |
---|
157 | } |
---|
158 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
159 | } |
---|
160 | |
---|
161 | function test_entry_content_onerror_1 () { |
---|
162 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onerror.xml'); |
---|
163 | try { |
---|
164 | $feed = new XML_Feed_Parser($content); |
---|
165 | } catch (XML_Feed_Parser_Exception $e) { |
---|
166 | $this->assertTrue(false); |
---|
167 | return; |
---|
168 | } |
---|
169 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
170 | } |
---|
171 | |
---|
172 | function test_entry_content_onfocus_1 () { |
---|
173 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onfocus.xml'); |
---|
174 | try { |
---|
175 | $feed = new XML_Feed_Parser($content); |
---|
176 | } catch (XML_Feed_Parser_Exception $e) { |
---|
177 | $this->assertTrue(false); |
---|
178 | return; |
---|
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_onkeydown_1 () { |
---|
184 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeydown.xml'); |
---|
185 | try { |
---|
186 | $feed = new XML_Feed_Parser($content); |
---|
187 | } catch (XML_Feed_Parser_Exception $e) { |
---|
188 | $this->assertTrue(false); |
---|
189 | return; |
---|
190 | } |
---|
191 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
192 | } |
---|
193 | |
---|
194 | function test_entry_content_onkeypress_1 () { |
---|
195 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeypress.xml'); |
---|
196 | try { |
---|
197 | $feed = new XML_Feed_Parser($content); |
---|
198 | } catch (XML_Feed_Parser_Exception $e) { |
---|
199 | $this->assertTrue(false); |
---|
200 | return; |
---|
201 | } |
---|
202 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
203 | } |
---|
204 | |
---|
205 | function test_entry_content_onkeyup_1 () { |
---|
206 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onkeyup.xml'); |
---|
207 | try { |
---|
208 | $feed = new XML_Feed_Parser($content); |
---|
209 | } catch (XML_Feed_Parser_Exception $e) { |
---|
210 | $this->assertTrue(false); |
---|
211 | return; |
---|
212 | } |
---|
213 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
214 | } |
---|
215 | |
---|
216 | function test_entry_content_onload_1 () { |
---|
217 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onload.xml'); |
---|
218 | try { |
---|
219 | $feed = new XML_Feed_Parser($content); |
---|
220 | } catch (XML_Feed_Parser_Exception $e) { |
---|
221 | $this->assertTrue(false); |
---|
222 | return; |
---|
223 | } |
---|
224 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
225 | } |
---|
226 | |
---|
227 | function test_entry_content_onmousedown_1 () { |
---|
228 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmousedown.xml'); |
---|
229 | try { |
---|
230 | $feed = new XML_Feed_Parser($content); |
---|
231 | } catch (XML_Feed_Parser_Exception $e) { |
---|
232 | $this->assertTrue(false); |
---|
233 | return; |
---|
234 | } |
---|
235 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
236 | } |
---|
237 | |
---|
238 | function test_entry_content_onmouseout_1 () { |
---|
239 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseout.xml'); |
---|
240 | try { |
---|
241 | $feed = new XML_Feed_Parser($content); |
---|
242 | } catch (XML_Feed_Parser_Exception $e) { |
---|
243 | $this->assertTrue(false); |
---|
244 | return; |
---|
245 | } |
---|
246 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
247 | } |
---|
248 | |
---|
249 | function test_entry_content_onmouseover_1 () { |
---|
250 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseover.xml'); |
---|
251 | try { |
---|
252 | $feed = new XML_Feed_Parser($content); |
---|
253 | } catch (XML_Feed_Parser_Exception $e) { |
---|
254 | $this->assertTrue(false); |
---|
255 | return; |
---|
256 | } |
---|
257 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
258 | } |
---|
259 | |
---|
260 | function test_entry_content_onmouseup_1 () { |
---|
261 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onmouseup.xml'); |
---|
262 | try { |
---|
263 | $feed = new XML_Feed_Parser($content); |
---|
264 | } catch (XML_Feed_Parser_Exception $e) { |
---|
265 | $this->assertTrue(false); |
---|
266 | return; |
---|
267 | } |
---|
268 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
269 | } |
---|
270 | |
---|
271 | function test_entry_content_onreset_1 () { |
---|
272 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onreset.xml'); |
---|
273 | try { |
---|
274 | $feed = new XML_Feed_Parser($content); |
---|
275 | } catch (XML_Feed_Parser_Exception $e) { |
---|
276 | $this->assertTrue(false); |
---|
277 | return; |
---|
278 | } |
---|
279 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
280 | } |
---|
281 | |
---|
282 | function test_entry_content_onresize_1 () { |
---|
283 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onresize.xml'); |
---|
284 | try { |
---|
285 | $feed = new XML_Feed_Parser($content); |
---|
286 | } catch (XML_Feed_Parser_Exception $e) { |
---|
287 | $this->assertTrue(false); |
---|
288 | return; |
---|
289 | } |
---|
290 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
291 | } |
---|
292 | |
---|
293 | function test_entry_content_onsubmit_1 () { |
---|
294 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onsubmit.xml'); |
---|
295 | try { |
---|
296 | $feed = new XML_Feed_Parser($content); |
---|
297 | } catch (XML_Feed_Parser_Exception $e) { |
---|
298 | $this->assertTrue(false); |
---|
299 | return; |
---|
300 | } |
---|
301 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
302 | } |
---|
303 | |
---|
304 | function test_entry_content_onunload_1 () { |
---|
305 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_onunload.xml'); |
---|
306 | try { |
---|
307 | $feed = new XML_Feed_Parser($content); |
---|
308 | } catch (XML_Feed_Parser_Exception $e) { |
---|
309 | $this->assertTrue(false); |
---|
310 | return; |
---|
311 | } |
---|
312 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
313 | } |
---|
314 | |
---|
315 | function test_entry_content_script_1 () { |
---|
316 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script.xml'); |
---|
317 | try { |
---|
318 | $feed = new XML_Feed_Parser($content); |
---|
319 | } catch (XML_Feed_Parser_Exception $e) { |
---|
320 | $this->assertTrue(false); |
---|
321 | return; |
---|
322 | } |
---|
323 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
324 | } |
---|
325 | |
---|
326 | function test_entry_content_script_base64_1 () { |
---|
327 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_base64.xml'); |
---|
328 | try { |
---|
329 | $feed = new XML_Feed_Parser($content); |
---|
330 | } catch (XML_Feed_Parser_Exception $e) { |
---|
331 | $this->assertTrue(false); |
---|
332 | return; |
---|
333 | } |
---|
334 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
335 | } |
---|
336 | |
---|
337 | function test_entry_content_script_cdata_1 () { |
---|
338 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_cdata.xml'); |
---|
339 | try { |
---|
340 | $feed = new XML_Feed_Parser($content); |
---|
341 | } catch (XML_Feed_Parser_Exception $e) { |
---|
342 | $this->assertTrue(false); |
---|
343 | return; |
---|
344 | } |
---|
345 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
346 | } |
---|
347 | |
---|
348 | function test_entry_content_script_inline_1 () { |
---|
349 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_script_inline.xml'); |
---|
350 | try { |
---|
351 | $feed = new XML_Feed_Parser($content); |
---|
352 | } catch (XML_Feed_Parser_Exception $e) { |
---|
353 | $this->assertTrue(false); |
---|
354 | return; |
---|
355 | } |
---|
356 | $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
357 | } |
---|
358 | |
---|
359 | function test_entry_content_style_1 () { |
---|
360 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_content_style.xml'); |
---|
361 | try { |
---|
362 | $feed = new XML_Feed_Parser($content); |
---|
363 | } catch (XML_Feed_Parser_Exception $e) { |
---|
364 | $this->assertTrue(false); |
---|
365 | return; |
---|
366 | } |
---|
367 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
368 | } |
---|
369 | |
---|
370 | function test_entry_summary_applet_1 () { |
---|
371 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_applet.xml'); |
---|
372 | try { |
---|
373 | $feed = new XML_Feed_Parser($content); |
---|
374 | } catch (XML_Feed_Parser_Exception $e) { |
---|
375 | $this->assertTrue(false); |
---|
376 | return; |
---|
377 | } |
---|
378 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
379 | } |
---|
380 | |
---|
381 | function test_entry_summary_blink_1 () { |
---|
382 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_blink.xml'); |
---|
383 | try { |
---|
384 | $feed = new XML_Feed_Parser($content); |
---|
385 | } catch (XML_Feed_Parser_Exception $e) { |
---|
386 | $this->assertTrue(false); |
---|
387 | return; |
---|
388 | } |
---|
389 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
390 | } |
---|
391 | |
---|
392 | function test_entry_summary_crazy_1 () { |
---|
393 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_crazy.xml'); |
---|
394 | try { |
---|
395 | $feed = new XML_Feed_Parser($content); |
---|
396 | } catch (XML_Feed_Parser_Exception $e) { |
---|
397 | $this->assertTrue(false); |
---|
398 | return; |
---|
399 | } |
---|
400 | $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); |
---|
401 | } |
---|
402 | |
---|
403 | function test_entry_summary_embed_1 () { |
---|
404 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_embed.xml'); |
---|
405 | try { |
---|
406 | $feed = new XML_Feed_Parser($content); |
---|
407 | } catch (XML_Feed_Parser_Exception $e) { |
---|
408 | $this->assertTrue(false); |
---|
409 | return; |
---|
410 | } |
---|
411 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
412 | } |
---|
413 | |
---|
414 | function test_entry_summary_frame_1 () { |
---|
415 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_frame.xml'); |
---|
416 | try { |
---|
417 | $feed = new XML_Feed_Parser($content); |
---|
418 | } catch (XML_Feed_Parser_Exception $e) { |
---|
419 | $this->assertTrue(false); |
---|
420 | return; |
---|
421 | } |
---|
422 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
423 | } |
---|
424 | |
---|
425 | function test_entry_summary_iframe_1 () { |
---|
426 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_iframe.xml'); |
---|
427 | try { |
---|
428 | $feed = new XML_Feed_Parser($content); |
---|
429 | } catch (XML_Feed_Parser_Exception $e) { |
---|
430 | $this->assertTrue(false); |
---|
431 | return; |
---|
432 | } |
---|
433 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
434 | } |
---|
435 | |
---|
436 | function test_entry_summary_link_1 () { |
---|
437 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_link.xml'); |
---|
438 | try { |
---|
439 | $feed = new XML_Feed_Parser($content); |
---|
440 | } catch (XML_Feed_Parser_Exception $e) { |
---|
441 | $this->assertTrue(false); |
---|
442 | return; |
---|
443 | } |
---|
444 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
445 | } |
---|
446 | |
---|
447 | function test_entry_summary_meta_1 () { |
---|
448 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_meta.xml'); |
---|
449 | try { |
---|
450 | $feed = new XML_Feed_Parser($content); |
---|
451 | } catch (XML_Feed_Parser_Exception $e) { |
---|
452 | $this->assertTrue(false); |
---|
453 | return; |
---|
454 | } |
---|
455 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
456 | } |
---|
457 | |
---|
458 | function test_entry_summary_object_1 () { |
---|
459 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_object.xml'); |
---|
460 | try { |
---|
461 | $feed = new XML_Feed_Parser($content); |
---|
462 | } catch (XML_Feed_Parser_Exception $e) { |
---|
463 | $this->assertTrue(false); |
---|
464 | return; |
---|
465 | } |
---|
466 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
467 | } |
---|
468 | |
---|
469 | function test_entry_summary_onabort_1 () { |
---|
470 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onabort.xml'); |
---|
471 | try { |
---|
472 | $feed = new XML_Feed_Parser($content); |
---|
473 | } catch (XML_Feed_Parser_Exception $e) { |
---|
474 | $this->assertTrue(false); |
---|
475 | return; |
---|
476 | } |
---|
477 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
478 | } |
---|
479 | |
---|
480 | function test_entry_summary_onblur_1 () { |
---|
481 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onblur.xml'); |
---|
482 | try { |
---|
483 | $feed = new XML_Feed_Parser($content); |
---|
484 | } catch (XML_Feed_Parser_Exception $e) { |
---|
485 | $this->assertTrue(false); |
---|
486 | return; |
---|
487 | } |
---|
488 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
489 | } |
---|
490 | |
---|
491 | function test_entry_summary_onchange_1 () { |
---|
492 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onchange.xml'); |
---|
493 | try { |
---|
494 | $feed = new XML_Feed_Parser($content); |
---|
495 | } catch (XML_Feed_Parser_Exception $e) { |
---|
496 | $this->assertTrue(false); |
---|
497 | return; |
---|
498 | } |
---|
499 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
500 | } |
---|
501 | |
---|
502 | function test_entry_summary_onclick_1 () { |
---|
503 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onclick.xml'); |
---|
504 | try { |
---|
505 | $feed = new XML_Feed_Parser($content); |
---|
506 | } catch (XML_Feed_Parser_Exception $e) { |
---|
507 | $this->assertTrue(false); |
---|
508 | return; |
---|
509 | } |
---|
510 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
511 | } |
---|
512 | |
---|
513 | function test_entry_summary_ondblclick_1 () { |
---|
514 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_ondblclick.xml'); |
---|
515 | try { |
---|
516 | $feed = new XML_Feed_Parser($content); |
---|
517 | } catch (XML_Feed_Parser_Exception $e) { |
---|
518 | $this->assertTrue(false); |
---|
519 | return; |
---|
520 | } |
---|
521 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
522 | } |
---|
523 | |
---|
524 | function test_entry_summary_onerror_1 () { |
---|
525 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onerror.xml'); |
---|
526 | try { |
---|
527 | $feed = new XML_Feed_Parser($content); |
---|
528 | } catch (XML_Feed_Parser_Exception $e) { |
---|
529 | $this->assertTrue(false); |
---|
530 | return; |
---|
531 | } |
---|
532 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
533 | } |
---|
534 | |
---|
535 | function test_entry_summary_onfocus_1 () { |
---|
536 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onfocus.xml'); |
---|
537 | try { |
---|
538 | $feed = new XML_Feed_Parser($content); |
---|
539 | } catch (XML_Feed_Parser_Exception $e) { |
---|
540 | $this->assertTrue(false); |
---|
541 | return; |
---|
542 | } |
---|
543 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
544 | } |
---|
545 | |
---|
546 | function test_entry_summary_onkeydown_1 () { |
---|
547 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeydown.xml'); |
---|
548 | try { |
---|
549 | $feed = new XML_Feed_Parser($content); |
---|
550 | } catch (XML_Feed_Parser_Exception $e) { |
---|
551 | $this->assertTrue(false); |
---|
552 | return; |
---|
553 | } |
---|
554 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
555 | } |
---|
556 | |
---|
557 | function test_entry_summary_onkeypress_1 () { |
---|
558 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeypress.xml'); |
---|
559 | try { |
---|
560 | $feed = new XML_Feed_Parser($content); |
---|
561 | } catch (XML_Feed_Parser_Exception $e) { |
---|
562 | $this->assertTrue(false); |
---|
563 | return; |
---|
564 | } |
---|
565 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
566 | } |
---|
567 | |
---|
568 | function test_entry_summary_onkeyup_1 () { |
---|
569 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onkeyup.xml'); |
---|
570 | try { |
---|
571 | $feed = new XML_Feed_Parser($content); |
---|
572 | } catch (XML_Feed_Parser_Exception $e) { |
---|
573 | $this->assertTrue(false); |
---|
574 | return; |
---|
575 | } |
---|
576 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
577 | } |
---|
578 | |
---|
579 | function test_entry_summary_onload_1 () { |
---|
580 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onload.xml'); |
---|
581 | try { |
---|
582 | $feed = new XML_Feed_Parser($content); |
---|
583 | } catch (XML_Feed_Parser_Exception $e) { |
---|
584 | $this->assertTrue(false); |
---|
585 | return; |
---|
586 | } |
---|
587 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
588 | } |
---|
589 | |
---|
590 | function test_entry_summary_onmousedown_1 () { |
---|
591 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmousedown.xml'); |
---|
592 | try { |
---|
593 | $feed = new XML_Feed_Parser($content); |
---|
594 | } catch (XML_Feed_Parser_Exception $e) { |
---|
595 | $this->assertTrue(false); |
---|
596 | return; |
---|
597 | } |
---|
598 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
599 | } |
---|
600 | |
---|
601 | function test_entry_summary_onmouseout_1 () { |
---|
602 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseout.xml'); |
---|
603 | try { |
---|
604 | $feed = new XML_Feed_Parser($content); |
---|
605 | } catch (XML_Feed_Parser_Exception $e) { |
---|
606 | $this->assertTrue(false); |
---|
607 | return; |
---|
608 | } |
---|
609 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
610 | } |
---|
611 | |
---|
612 | function test_entry_summary_onmouseover_1 () { |
---|
613 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseover.xml'); |
---|
614 | try { |
---|
615 | $feed = new XML_Feed_Parser($content); |
---|
616 | } catch (XML_Feed_Parser_Exception $e) { |
---|
617 | $this->assertTrue(false); |
---|
618 | return; |
---|
619 | } |
---|
620 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
621 | } |
---|
622 | |
---|
623 | function test_entry_summary_onmouseup_1 () { |
---|
624 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onmouseup.xml'); |
---|
625 | try { |
---|
626 | $feed = new XML_Feed_Parser($content); |
---|
627 | } catch (XML_Feed_Parser_Exception $e) { |
---|
628 | $this->assertTrue(false); |
---|
629 | return; |
---|
630 | } |
---|
631 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
632 | } |
---|
633 | |
---|
634 | function test_entry_summary_onreset_1 () { |
---|
635 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onreset.xml'); |
---|
636 | try { |
---|
637 | $feed = new XML_Feed_Parser($content); |
---|
638 | } catch (XML_Feed_Parser_Exception $e) { |
---|
639 | $this->assertTrue(false); |
---|
640 | return; |
---|
641 | } |
---|
642 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
643 | } |
---|
644 | |
---|
645 | function test_entry_summary_onresize_1 () { |
---|
646 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onresize.xml'); |
---|
647 | try { |
---|
648 | $feed = new XML_Feed_Parser($content); |
---|
649 | } catch (XML_Feed_Parser_Exception $e) { |
---|
650 | $this->assertTrue(false); |
---|
651 | return; |
---|
652 | } |
---|
653 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
654 | } |
---|
655 | |
---|
656 | function test_entry_summary_onsubmit_1 () { |
---|
657 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onsubmit.xml'); |
---|
658 | try { |
---|
659 | $feed = new XML_Feed_Parser($content); |
---|
660 | } catch (XML_Feed_Parser_Exception $e) { |
---|
661 | $this->assertTrue(false); |
---|
662 | return; |
---|
663 | } |
---|
664 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
665 | } |
---|
666 | |
---|
667 | function test_entry_summary_onunload_1 () { |
---|
668 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_onunload.xml'); |
---|
669 | try { |
---|
670 | $feed = new XML_Feed_Parser($content); |
---|
671 | } catch (XML_Feed_Parser_Exception $e) { |
---|
672 | $this->assertTrue(false); |
---|
673 | return; |
---|
674 | } |
---|
675 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->summary); |
---|
676 | } |
---|
677 | |
---|
678 | function test_entry_summary_script_1 () { |
---|
679 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script.xml'); |
---|
680 | try { |
---|
681 | $feed = new XML_Feed_Parser($content); |
---|
682 | } catch (XML_Feed_Parser_Exception $e) { |
---|
683 | $this->assertTrue(false); |
---|
684 | return; |
---|
685 | } |
---|
686 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
687 | } |
---|
688 | |
---|
689 | function test_entry_summary_script_base64_1 () { |
---|
690 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_base64.xml'); |
---|
691 | try { |
---|
692 | $feed = new XML_Feed_Parser($content); |
---|
693 | } catch (XML_Feed_Parser_Exception $e) { |
---|
694 | $this->assertTrue(false); |
---|
695 | return; |
---|
696 | } |
---|
697 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
698 | } |
---|
699 | |
---|
700 | function test_entry_summary_script_cdata_1 () { |
---|
701 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_cdata.xml'); |
---|
702 | try { |
---|
703 | $feed = new XML_Feed_Parser($content); |
---|
704 | } catch (XML_Feed_Parser_Exception $e) { |
---|
705 | $this->assertTrue(false); |
---|
706 | return; |
---|
707 | } |
---|
708 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
709 | } |
---|
710 | |
---|
711 | function test_entry_summary_script_inline_1 () { |
---|
712 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_inline.xml'); |
---|
713 | try { |
---|
714 | $feed = new XML_Feed_Parser($content); |
---|
715 | } catch (XML_Feed_Parser_Exception $e) { |
---|
716 | $this->assertTrue(false); |
---|
717 | return; |
---|
718 | } |
---|
719 | $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->summary); |
---|
720 | } |
---|
721 | |
---|
722 | function test_entry_summary_script_map_description_1 () { |
---|
723 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_script_map_description.xml'); |
---|
724 | try { |
---|
725 | $feed = new XML_Feed_Parser($content); |
---|
726 | } catch (XML_Feed_Parser_Exception $e) { |
---|
727 | $this->assertTrue(false); |
---|
728 | return; |
---|
729 | } |
---|
730 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
731 | } |
---|
732 | |
---|
733 | function test_entry_summary_style_1 () { |
---|
734 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_summary_style.xml'); |
---|
735 | try { |
---|
736 | $feed = new XML_Feed_Parser($content); |
---|
737 | } catch (XML_Feed_Parser_Exception $e) { |
---|
738 | $this->assertTrue(false); |
---|
739 | return; |
---|
740 | } |
---|
741 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->summary); |
---|
742 | } |
---|
743 | |
---|
744 | function test_entry_title_applet_1 () { |
---|
745 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_applet.xml'); |
---|
746 | try { |
---|
747 | $feed = new XML_Feed_Parser($content); |
---|
748 | } catch (XML_Feed_Parser_Exception $e) { |
---|
749 | $this->assertTrue(false); |
---|
750 | return; |
---|
751 | } |
---|
752 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
753 | } |
---|
754 | |
---|
755 | function test_entry_title_blink_1 () { |
---|
756 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_blink.xml'); |
---|
757 | try { |
---|
758 | $feed = new XML_Feed_Parser($content); |
---|
759 | } catch (XML_Feed_Parser_Exception $e) { |
---|
760 | $this->assertTrue(false); |
---|
761 | return; |
---|
762 | } |
---|
763 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
764 | } |
---|
765 | |
---|
766 | function test_entry_title_crazy_1 () { |
---|
767 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_crazy.xml'); |
---|
768 | try { |
---|
769 | $feed = new XML_Feed_Parser($content); |
---|
770 | } catch (XML_Feed_Parser_Exception $e) { |
---|
771 | $this->assertTrue(false); |
---|
772 | return; |
---|
773 | } |
---|
774 | $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); |
---|
775 | } |
---|
776 | |
---|
777 | function test_entry_title_embed_1 () { |
---|
778 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_embed.xml'); |
---|
779 | try { |
---|
780 | $feed = new XML_Feed_Parser($content); |
---|
781 | } catch (XML_Feed_Parser_Exception $e) { |
---|
782 | $this->assertTrue(false); |
---|
783 | return; |
---|
784 | } |
---|
785 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
786 | } |
---|
787 | |
---|
788 | function test_entry_title_frame_1 () { |
---|
789 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_frame.xml'); |
---|
790 | try { |
---|
791 | $feed = new XML_Feed_Parser($content); |
---|
792 | } catch (XML_Feed_Parser_Exception $e) { |
---|
793 | $this->assertTrue(false); |
---|
794 | return; |
---|
795 | } |
---|
796 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
797 | } |
---|
798 | |
---|
799 | function test_entry_title_iframe_1 () { |
---|
800 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_iframe.xml'); |
---|
801 | try { |
---|
802 | $feed = new XML_Feed_Parser($content); |
---|
803 | } catch (XML_Feed_Parser_Exception $e) { |
---|
804 | $this->assertTrue(false); |
---|
805 | return; |
---|
806 | } |
---|
807 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
808 | } |
---|
809 | |
---|
810 | function test_entry_title_link_1 () { |
---|
811 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_link.xml'); |
---|
812 | try { |
---|
813 | $feed = new XML_Feed_Parser($content); |
---|
814 | } catch (XML_Feed_Parser_Exception $e) { |
---|
815 | $this->assertTrue(false); |
---|
816 | return; |
---|
817 | } |
---|
818 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
819 | } |
---|
820 | |
---|
821 | function test_entry_title_meta_1 () { |
---|
822 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_meta.xml'); |
---|
823 | try { |
---|
824 | $feed = new XML_Feed_Parser($content); |
---|
825 | } catch (XML_Feed_Parser_Exception $e) { |
---|
826 | $this->assertTrue(false); |
---|
827 | return; |
---|
828 | } |
---|
829 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
830 | } |
---|
831 | |
---|
832 | function test_entry_title_object_1 () { |
---|
833 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_object.xml'); |
---|
834 | try { |
---|
835 | $feed = new XML_Feed_Parser($content); |
---|
836 | } catch (XML_Feed_Parser_Exception $e) { |
---|
837 | $this->assertTrue(false); |
---|
838 | return; |
---|
839 | } |
---|
840 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
841 | } |
---|
842 | |
---|
843 | function test_entry_title_onabort_1 () { |
---|
844 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onabort.xml'); |
---|
845 | try { |
---|
846 | $feed = new XML_Feed_Parser($content); |
---|
847 | } catch (XML_Feed_Parser_Exception $e) { |
---|
848 | $this->assertTrue(false); |
---|
849 | return; |
---|
850 | } |
---|
851 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
852 | } |
---|
853 | |
---|
854 | function test_entry_title_onblur_1 () { |
---|
855 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onblur.xml'); |
---|
856 | try { |
---|
857 | $feed = new XML_Feed_Parser($content); |
---|
858 | } catch (XML_Feed_Parser_Exception $e) { |
---|
859 | $this->assertTrue(false); |
---|
860 | return; |
---|
861 | } |
---|
862 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
863 | } |
---|
864 | |
---|
865 | function test_entry_title_onchange_1 () { |
---|
866 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onchange.xml'); |
---|
867 | try { |
---|
868 | $feed = new XML_Feed_Parser($content); |
---|
869 | } catch (XML_Feed_Parser_Exception $e) { |
---|
870 | $this->assertTrue(false); |
---|
871 | return; |
---|
872 | } |
---|
873 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
874 | } |
---|
875 | |
---|
876 | function test_entry_title_onclick_1 () { |
---|
877 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onclick.xml'); |
---|
878 | try { |
---|
879 | $feed = new XML_Feed_Parser($content); |
---|
880 | } catch (XML_Feed_Parser_Exception $e) { |
---|
881 | $this->assertTrue(false); |
---|
882 | return; |
---|
883 | } |
---|
884 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
885 | } |
---|
886 | |
---|
887 | function test_entry_title_ondblclick_1 () { |
---|
888 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_ondblclick.xml'); |
---|
889 | try { |
---|
890 | $feed = new XML_Feed_Parser($content); |
---|
891 | } catch (XML_Feed_Parser_Exception $e) { |
---|
892 | $this->assertTrue(false); |
---|
893 | return; |
---|
894 | } |
---|
895 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
896 | } |
---|
897 | |
---|
898 | function test_entry_title_onerror_1 () { |
---|
899 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onerror.xml'); |
---|
900 | try { |
---|
901 | $feed = new XML_Feed_Parser($content); |
---|
902 | } catch (XML_Feed_Parser_Exception $e) { |
---|
903 | $this->assertTrue(false); |
---|
904 | return; |
---|
905 | } |
---|
906 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
907 | } |
---|
908 | |
---|
909 | function test_entry_title_onfocus_1 () { |
---|
910 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onfocus.xml'); |
---|
911 | try { |
---|
912 | $feed = new XML_Feed_Parser($content); |
---|
913 | } catch (XML_Feed_Parser_Exception $e) { |
---|
914 | $this->assertTrue(false); |
---|
915 | return; |
---|
916 | } |
---|
917 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
918 | } |
---|
919 | |
---|
920 | function test_entry_title_onkeydown_1 () { |
---|
921 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeydown.xml'); |
---|
922 | try { |
---|
923 | $feed = new XML_Feed_Parser($content); |
---|
924 | } catch (XML_Feed_Parser_Exception $e) { |
---|
925 | $this->assertTrue(false); |
---|
926 | return; |
---|
927 | } |
---|
928 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
929 | } |
---|
930 | |
---|
931 | function test_entry_title_onkeypress_1 () { |
---|
932 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeypress.xml'); |
---|
933 | try { |
---|
934 | $feed = new XML_Feed_Parser($content); |
---|
935 | } catch (XML_Feed_Parser_Exception $e) { |
---|
936 | $this->assertTrue(false); |
---|
937 | return; |
---|
938 | } |
---|
939 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
940 | } |
---|
941 | |
---|
942 | function test_entry_title_onkeyup_1 () { |
---|
943 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onkeyup.xml'); |
---|
944 | try { |
---|
945 | $feed = new XML_Feed_Parser($content); |
---|
946 | } catch (XML_Feed_Parser_Exception $e) { |
---|
947 | $this->assertTrue(false); |
---|
948 | return; |
---|
949 | } |
---|
950 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
951 | } |
---|
952 | |
---|
953 | function test_entry_title_onload_1 () { |
---|
954 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onload.xml'); |
---|
955 | try { |
---|
956 | $feed = new XML_Feed_Parser($content); |
---|
957 | } catch (XML_Feed_Parser_Exception $e) { |
---|
958 | $this->assertTrue(false); |
---|
959 | return; |
---|
960 | } |
---|
961 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
962 | } |
---|
963 | |
---|
964 | function test_entry_title_onmousedown_1 () { |
---|
965 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmousedown.xml'); |
---|
966 | try { |
---|
967 | $feed = new XML_Feed_Parser($content); |
---|
968 | } catch (XML_Feed_Parser_Exception $e) { |
---|
969 | $this->assertTrue(false); |
---|
970 | return; |
---|
971 | } |
---|
972 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
973 | } |
---|
974 | |
---|
975 | function test_entry_title_onmouseout_1 () { |
---|
976 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseout.xml'); |
---|
977 | try { |
---|
978 | $feed = new XML_Feed_Parser($content); |
---|
979 | } catch (XML_Feed_Parser_Exception $e) { |
---|
980 | $this->assertTrue(false); |
---|
981 | return; |
---|
982 | } |
---|
983 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
984 | } |
---|
985 | |
---|
986 | function test_entry_title_onmouseover_1 () { |
---|
987 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseover.xml'); |
---|
988 | try { |
---|
989 | $feed = new XML_Feed_Parser($content); |
---|
990 | } catch (XML_Feed_Parser_Exception $e) { |
---|
991 | $this->assertTrue(false); |
---|
992 | return; |
---|
993 | } |
---|
994 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
995 | } |
---|
996 | |
---|
997 | function test_entry_title_onmouseup_1 () { |
---|
998 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onmouseup.xml'); |
---|
999 | try { |
---|
1000 | $feed = new XML_Feed_Parser($content); |
---|
1001 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1002 | $this->assertTrue(false); |
---|
1003 | return; |
---|
1004 | } |
---|
1005 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
1006 | } |
---|
1007 | |
---|
1008 | function test_entry_title_onreset_1 () { |
---|
1009 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onreset.xml'); |
---|
1010 | try { |
---|
1011 | $feed = new XML_Feed_Parser($content); |
---|
1012 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1013 | $this->assertTrue(false); |
---|
1014 | return; |
---|
1015 | } |
---|
1016 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
1017 | } |
---|
1018 | |
---|
1019 | function test_entry_title_onresize_1 () { |
---|
1020 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onresize.xml'); |
---|
1021 | try { |
---|
1022 | $feed = new XML_Feed_Parser($content); |
---|
1023 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1024 | $this->assertTrue(false); |
---|
1025 | return; |
---|
1026 | } |
---|
1027 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
1028 | } |
---|
1029 | |
---|
1030 | function test_entry_title_onsubmit_1 () { |
---|
1031 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onsubmit.xml'); |
---|
1032 | try { |
---|
1033 | $feed = new XML_Feed_Parser($content); |
---|
1034 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1035 | $this->assertTrue(false); |
---|
1036 | return; |
---|
1037 | } |
---|
1038 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
1039 | } |
---|
1040 | |
---|
1041 | function test_entry_title_onunload_1 () { |
---|
1042 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_onunload.xml'); |
---|
1043 | try { |
---|
1044 | $feed = new XML_Feed_Parser($content); |
---|
1045 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1046 | $this->assertTrue(false); |
---|
1047 | return; |
---|
1048 | } |
---|
1049 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->title); |
---|
1050 | } |
---|
1051 | |
---|
1052 | function test_entry_title_script_1 () { |
---|
1053 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script.xml'); |
---|
1054 | try { |
---|
1055 | $feed = new XML_Feed_Parser($content); |
---|
1056 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1057 | $this->assertTrue(false); |
---|
1058 | return; |
---|
1059 | } |
---|
1060 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
1061 | } |
---|
1062 | |
---|
1063 | function test_entry_title_script_cdata_1 () { |
---|
1064 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script_cdata.xml'); |
---|
1065 | try { |
---|
1066 | $feed = new XML_Feed_Parser($content); |
---|
1067 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1068 | $this->assertTrue(false); |
---|
1069 | return; |
---|
1070 | } |
---|
1071 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->title); |
---|
1072 | } |
---|
1073 | |
---|
1074 | function test_entry_title_script_inline_1 () { |
---|
1075 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_script_inline.xml'); |
---|
1076 | try { |
---|
1077 | $feed = new XML_Feed_Parser($content); |
---|
1078 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1079 | $this->assertTrue(false); |
---|
1080 | return; |
---|
1081 | } |
---|
1082 | $this->assertEquals('<div>safe description</div>', $feed->getEntryByOffset(0)->title); |
---|
1083 | } |
---|
1084 | |
---|
1085 | function test_entry_title_style_1 () { |
---|
1086 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/entry_title_style.xml'); |
---|
1087 | try { |
---|
1088 | $feed = new XML_Feed_Parser($content); |
---|
1089 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1090 | $this->assertTrue(false); |
---|
1091 | return; |
---|
1092 | } |
---|
1093 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->title); |
---|
1094 | } |
---|
1095 | |
---|
1096 | function test_feed_copyright_applet_1 () { |
---|
1097 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_applet.xml'); |
---|
1098 | try { |
---|
1099 | $feed = new XML_Feed_Parser($content); |
---|
1100 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1101 | $this->assertTrue(false); |
---|
1102 | return; |
---|
1103 | } |
---|
1104 | $this->assertEquals('safe description', $feed->copyright); |
---|
1105 | } |
---|
1106 | |
---|
1107 | function test_feed_copyright_blink_1 () { |
---|
1108 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_blink.xml'); |
---|
1109 | try { |
---|
1110 | $feed = new XML_Feed_Parser($content); |
---|
1111 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1112 | $this->assertTrue(false); |
---|
1113 | return; |
---|
1114 | } |
---|
1115 | $this->assertEquals('safe description', $feed->copyright); |
---|
1116 | } |
---|
1117 | |
---|
1118 | function test_feed_copyright_crazy_1 () { |
---|
1119 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_crazy.xml'); |
---|
1120 | try { |
---|
1121 | $feed = new XML_Feed_Parser($content); |
---|
1122 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1123 | $this->assertTrue(false); |
---|
1124 | return; |
---|
1125 | } |
---|
1126 | $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); |
---|
1127 | } |
---|
1128 | |
---|
1129 | function test_feed_copyright_embed_1 () { |
---|
1130 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_embed.xml'); |
---|
1131 | try { |
---|
1132 | $feed = new XML_Feed_Parser($content); |
---|
1133 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1134 | $this->assertTrue(false); |
---|
1135 | return; |
---|
1136 | } |
---|
1137 | $this->assertEquals('safe description', $feed->copyright); |
---|
1138 | } |
---|
1139 | |
---|
1140 | function test_feed_copyright_frame_1 () { |
---|
1141 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_frame.xml'); |
---|
1142 | try { |
---|
1143 | $feed = new XML_Feed_Parser($content); |
---|
1144 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1145 | $this->assertTrue(false); |
---|
1146 | return; |
---|
1147 | } |
---|
1148 | $this->assertEquals('safe description', $feed->copyright); |
---|
1149 | } |
---|
1150 | |
---|
1151 | function test_feed_copyright_iframe_1 () { |
---|
1152 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_iframe.xml'); |
---|
1153 | try { |
---|
1154 | $feed = new XML_Feed_Parser($content); |
---|
1155 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1156 | $this->assertTrue(false); |
---|
1157 | return; |
---|
1158 | } |
---|
1159 | $this->assertEquals('safe description', $feed->copyright); |
---|
1160 | } |
---|
1161 | |
---|
1162 | function test_feed_copyright_link_1 () { |
---|
1163 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_link.xml'); |
---|
1164 | try { |
---|
1165 | $feed = new XML_Feed_Parser($content); |
---|
1166 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1167 | $this->assertTrue(false); |
---|
1168 | return; |
---|
1169 | } |
---|
1170 | $this->assertEquals('safe description', $feed->copyright); |
---|
1171 | } |
---|
1172 | |
---|
1173 | function test_feed_copyright_meta_1 () { |
---|
1174 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_meta.xml'); |
---|
1175 | try { |
---|
1176 | $feed = new XML_Feed_Parser($content); |
---|
1177 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1178 | $this->assertTrue(false); |
---|
1179 | return; |
---|
1180 | } |
---|
1181 | $this->assertEquals('safe description', $feed->copyright); |
---|
1182 | } |
---|
1183 | |
---|
1184 | function test_feed_copyright_object_1 () { |
---|
1185 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_object.xml'); |
---|
1186 | try { |
---|
1187 | $feed = new XML_Feed_Parser($content); |
---|
1188 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1189 | $this->assertTrue(false); |
---|
1190 | return; |
---|
1191 | } |
---|
1192 | $this->assertEquals('safe description', $feed->copyright); |
---|
1193 | } |
---|
1194 | |
---|
1195 | function test_feed_copyright_onabort_1 () { |
---|
1196 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onabort.xml'); |
---|
1197 | try { |
---|
1198 | $feed = new XML_Feed_Parser($content); |
---|
1199 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1200 | $this->assertTrue(false); |
---|
1201 | return; |
---|
1202 | } |
---|
1203 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1204 | } |
---|
1205 | |
---|
1206 | function test_feed_copyright_onblur_1 () { |
---|
1207 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onblur.xml'); |
---|
1208 | try { |
---|
1209 | $feed = new XML_Feed_Parser($content); |
---|
1210 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1211 | $this->assertTrue(false); |
---|
1212 | return; |
---|
1213 | } |
---|
1214 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1215 | } |
---|
1216 | |
---|
1217 | function test_feed_copyright_onchange_1 () { |
---|
1218 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onchange.xml'); |
---|
1219 | try { |
---|
1220 | $feed = new XML_Feed_Parser($content); |
---|
1221 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1222 | $this->assertTrue(false); |
---|
1223 | return; |
---|
1224 | } |
---|
1225 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1226 | } |
---|
1227 | |
---|
1228 | function test_feed_copyright_onclick_1 () { |
---|
1229 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onclick.xml'); |
---|
1230 | try { |
---|
1231 | $feed = new XML_Feed_Parser($content); |
---|
1232 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1233 | $this->assertTrue(false); |
---|
1234 | return; |
---|
1235 | } |
---|
1236 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1237 | } |
---|
1238 | |
---|
1239 | function test_feed_copyright_ondblclick_1 () { |
---|
1240 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_ondblclick.xml'); |
---|
1241 | try { |
---|
1242 | $feed = new XML_Feed_Parser($content); |
---|
1243 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1244 | $this->assertTrue(false); |
---|
1245 | return; |
---|
1246 | } |
---|
1247 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1248 | } |
---|
1249 | |
---|
1250 | function test_feed_copyright_onerror_1 () { |
---|
1251 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onerror.xml'); |
---|
1252 | try { |
---|
1253 | $feed = new XML_Feed_Parser($content); |
---|
1254 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1255 | $this->assertTrue(false); |
---|
1256 | return; |
---|
1257 | } |
---|
1258 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1259 | } |
---|
1260 | |
---|
1261 | function test_feed_copyright_onfocus_1 () { |
---|
1262 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onfocus.xml'); |
---|
1263 | try { |
---|
1264 | $feed = new XML_Feed_Parser($content); |
---|
1265 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1266 | $this->assertTrue(false); |
---|
1267 | return; |
---|
1268 | } |
---|
1269 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1270 | } |
---|
1271 | |
---|
1272 | function test_feed_copyright_onkeydown_1 () { |
---|
1273 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeydown.xml'); |
---|
1274 | try { |
---|
1275 | $feed = new XML_Feed_Parser($content); |
---|
1276 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1277 | $this->assertTrue(false); |
---|
1278 | return; |
---|
1279 | } |
---|
1280 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1281 | } |
---|
1282 | |
---|
1283 | function test_feed_copyright_onkeypress_1 () { |
---|
1284 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeypress.xml'); |
---|
1285 | try { |
---|
1286 | $feed = new XML_Feed_Parser($content); |
---|
1287 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1288 | $this->assertTrue(false); |
---|
1289 | return; |
---|
1290 | } |
---|
1291 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1292 | } |
---|
1293 | |
---|
1294 | function test_feed_copyright_onkeyup_1 () { |
---|
1295 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onkeyup.xml'); |
---|
1296 | try { |
---|
1297 | $feed = new XML_Feed_Parser($content); |
---|
1298 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1299 | $this->assertTrue(false); |
---|
1300 | return; |
---|
1301 | } |
---|
1302 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1303 | } |
---|
1304 | |
---|
1305 | function test_feed_copyright_onload_1 () { |
---|
1306 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onload.xml'); |
---|
1307 | try { |
---|
1308 | $feed = new XML_Feed_Parser($content); |
---|
1309 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1310 | $this->assertTrue(false); |
---|
1311 | return; |
---|
1312 | } |
---|
1313 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1314 | } |
---|
1315 | |
---|
1316 | function test_feed_copyright_onmousedown_1 () { |
---|
1317 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmousedown.xml'); |
---|
1318 | try { |
---|
1319 | $feed = new XML_Feed_Parser($content); |
---|
1320 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1321 | $this->assertTrue(false); |
---|
1322 | return; |
---|
1323 | } |
---|
1324 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1325 | } |
---|
1326 | |
---|
1327 | function test_feed_copyright_onmouseout_1 () { |
---|
1328 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseout.xml'); |
---|
1329 | try { |
---|
1330 | $feed = new XML_Feed_Parser($content); |
---|
1331 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1332 | $this->assertTrue(false); |
---|
1333 | return; |
---|
1334 | } |
---|
1335 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1336 | } |
---|
1337 | |
---|
1338 | function test_feed_copyright_onmouseover_1 () { |
---|
1339 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseover.xml'); |
---|
1340 | try { |
---|
1341 | $feed = new XML_Feed_Parser($content); |
---|
1342 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1343 | $this->assertTrue(false); |
---|
1344 | return; |
---|
1345 | } |
---|
1346 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1347 | } |
---|
1348 | |
---|
1349 | function test_feed_copyright_onmouseup_1 () { |
---|
1350 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onmouseup.xml'); |
---|
1351 | try { |
---|
1352 | $feed = new XML_Feed_Parser($content); |
---|
1353 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1354 | $this->assertTrue(false); |
---|
1355 | return; |
---|
1356 | } |
---|
1357 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1358 | } |
---|
1359 | |
---|
1360 | function test_feed_copyright_onreset_1 () { |
---|
1361 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onreset.xml'); |
---|
1362 | try { |
---|
1363 | $feed = new XML_Feed_Parser($content); |
---|
1364 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1365 | $this->assertTrue(false); |
---|
1366 | return; |
---|
1367 | } |
---|
1368 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1369 | } |
---|
1370 | |
---|
1371 | function test_feed_copyright_onresize_1 () { |
---|
1372 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onresize.xml'); |
---|
1373 | try { |
---|
1374 | $feed = new XML_Feed_Parser($content); |
---|
1375 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1376 | $this->assertTrue(false); |
---|
1377 | return; |
---|
1378 | } |
---|
1379 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1380 | } |
---|
1381 | |
---|
1382 | function test_feed_copyright_onsubmit_1 () { |
---|
1383 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onsubmit.xml'); |
---|
1384 | try { |
---|
1385 | $feed = new XML_Feed_Parser($content); |
---|
1386 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1387 | $this->assertTrue(false); |
---|
1388 | return; |
---|
1389 | } |
---|
1390 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1391 | } |
---|
1392 | |
---|
1393 | function test_feed_copyright_onunload_1 () { |
---|
1394 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_onunload.xml'); |
---|
1395 | try { |
---|
1396 | $feed = new XML_Feed_Parser($content); |
---|
1397 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1398 | $this->assertTrue(false); |
---|
1399 | return; |
---|
1400 | } |
---|
1401 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->copyright); |
---|
1402 | } |
---|
1403 | |
---|
1404 | function test_feed_copyright_script_1 () { |
---|
1405 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script.xml'); |
---|
1406 | try { |
---|
1407 | $feed = new XML_Feed_Parser($content); |
---|
1408 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1409 | $this->assertTrue(false); |
---|
1410 | return; |
---|
1411 | } |
---|
1412 | $this->assertEquals('safe description', $feed->copyright); |
---|
1413 | } |
---|
1414 | |
---|
1415 | function test_feed_copyright_script_cdata_1 () { |
---|
1416 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script_cdata.xml'); |
---|
1417 | try { |
---|
1418 | $feed = new XML_Feed_Parser($content); |
---|
1419 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1420 | $this->assertTrue(false); |
---|
1421 | return; |
---|
1422 | } |
---|
1423 | $this->assertEquals('safe description', $feed->copyright); |
---|
1424 | } |
---|
1425 | |
---|
1426 | function test_feed_copyright_script_inline_1 () { |
---|
1427 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_script_inline.xml'); |
---|
1428 | try { |
---|
1429 | $feed = new XML_Feed_Parser($content); |
---|
1430 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1431 | $this->assertTrue(false); |
---|
1432 | return; |
---|
1433 | } |
---|
1434 | $this->assertEquals('<div>safe description</div>', $feed->copyright); |
---|
1435 | } |
---|
1436 | |
---|
1437 | function test_feed_copyright_style_1 () { |
---|
1438 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_copyright_style.xml'); |
---|
1439 | try { |
---|
1440 | $feed = new XML_Feed_Parser($content); |
---|
1441 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1442 | $this->assertTrue(false); |
---|
1443 | return; |
---|
1444 | } |
---|
1445 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->copyright); |
---|
1446 | } |
---|
1447 | |
---|
1448 | function test_feed_info_applet_1 () { |
---|
1449 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_applet.xml'); |
---|
1450 | try { |
---|
1451 | $feed = new XML_Feed_Parser($content); |
---|
1452 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1453 | $this->assertTrue(false); |
---|
1454 | return; |
---|
1455 | } |
---|
1456 | $this->assertEquals('safe description', $feed->info); |
---|
1457 | } |
---|
1458 | |
---|
1459 | function test_feed_info_blink_1 () { |
---|
1460 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_blink.xml'); |
---|
1461 | try { |
---|
1462 | $feed = new XML_Feed_Parser($content); |
---|
1463 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1464 | $this->assertTrue(false); |
---|
1465 | return; |
---|
1466 | } |
---|
1467 | $this->assertEquals('safe description', $feed->info); |
---|
1468 | } |
---|
1469 | |
---|
1470 | function test_feed_info_crazy_1 () { |
---|
1471 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_crazy.xml'); |
---|
1472 | try { |
---|
1473 | $feed = new XML_Feed_Parser($content); |
---|
1474 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1475 | $this->assertTrue(false); |
---|
1476 | return; |
---|
1477 | } |
---|
1478 | $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); |
---|
1479 | } |
---|
1480 | |
---|
1481 | function test_feed_info_embed_1 () { |
---|
1482 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_embed.xml'); |
---|
1483 | try { |
---|
1484 | $feed = new XML_Feed_Parser($content); |
---|
1485 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1486 | $this->assertTrue(false); |
---|
1487 | return; |
---|
1488 | } |
---|
1489 | $this->assertEquals('safe description', $feed->info); |
---|
1490 | } |
---|
1491 | |
---|
1492 | function test_feed_info_frame_1 () { |
---|
1493 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_frame.xml'); |
---|
1494 | try { |
---|
1495 | $feed = new XML_Feed_Parser($content); |
---|
1496 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1497 | $this->assertTrue(false); |
---|
1498 | return; |
---|
1499 | } |
---|
1500 | $this->assertEquals('safe description', $feed->info); |
---|
1501 | } |
---|
1502 | |
---|
1503 | function test_feed_info_iframe_1 () { |
---|
1504 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_iframe.xml'); |
---|
1505 | try { |
---|
1506 | $feed = new XML_Feed_Parser($content); |
---|
1507 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1508 | $this->assertTrue(false); |
---|
1509 | return; |
---|
1510 | } |
---|
1511 | $this->assertEquals('safe description', $feed->info); |
---|
1512 | } |
---|
1513 | |
---|
1514 | function test_feed_info_link_1 () { |
---|
1515 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_link.xml'); |
---|
1516 | try { |
---|
1517 | $feed = new XML_Feed_Parser($content); |
---|
1518 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1519 | $this->assertTrue(false); |
---|
1520 | return; |
---|
1521 | } |
---|
1522 | $this->assertEquals('safe description', $feed->info); |
---|
1523 | } |
---|
1524 | |
---|
1525 | function test_feed_info_meta_1 () { |
---|
1526 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_meta.xml'); |
---|
1527 | try { |
---|
1528 | $feed = new XML_Feed_Parser($content); |
---|
1529 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1530 | $this->assertTrue(false); |
---|
1531 | return; |
---|
1532 | } |
---|
1533 | $this->assertEquals('safe description', $feed->info); |
---|
1534 | } |
---|
1535 | |
---|
1536 | function test_feed_info_object_1 () { |
---|
1537 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_object.xml'); |
---|
1538 | try { |
---|
1539 | $feed = new XML_Feed_Parser($content); |
---|
1540 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1541 | $this->assertTrue(false); |
---|
1542 | return; |
---|
1543 | } |
---|
1544 | $this->assertEquals('safe description', $feed->info); |
---|
1545 | } |
---|
1546 | |
---|
1547 | function test_feed_info_onabort_1 () { |
---|
1548 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onabort.xml'); |
---|
1549 | try { |
---|
1550 | $feed = new XML_Feed_Parser($content); |
---|
1551 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1552 | $this->assertTrue(false); |
---|
1553 | return; |
---|
1554 | } |
---|
1555 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1556 | } |
---|
1557 | |
---|
1558 | function test_feed_info_onblur_1 () { |
---|
1559 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onblur.xml'); |
---|
1560 | try { |
---|
1561 | $feed = new XML_Feed_Parser($content); |
---|
1562 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1563 | $this->assertTrue(false); |
---|
1564 | return; |
---|
1565 | } |
---|
1566 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1567 | } |
---|
1568 | |
---|
1569 | function test_feed_info_onchange_1 () { |
---|
1570 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onchange.xml'); |
---|
1571 | try { |
---|
1572 | $feed = new XML_Feed_Parser($content); |
---|
1573 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1574 | $this->assertTrue(false); |
---|
1575 | return; |
---|
1576 | } |
---|
1577 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1578 | } |
---|
1579 | |
---|
1580 | function test_feed_info_onclick_1 () { |
---|
1581 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onclick.xml'); |
---|
1582 | try { |
---|
1583 | $feed = new XML_Feed_Parser($content); |
---|
1584 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1585 | $this->assertTrue(false); |
---|
1586 | return; |
---|
1587 | } |
---|
1588 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1589 | } |
---|
1590 | |
---|
1591 | function test_feed_info_ondblclick_1 () { |
---|
1592 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_ondblclick.xml'); |
---|
1593 | try { |
---|
1594 | $feed = new XML_Feed_Parser($content); |
---|
1595 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1596 | $this->assertTrue(false); |
---|
1597 | return; |
---|
1598 | } |
---|
1599 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1600 | } |
---|
1601 | |
---|
1602 | function test_feed_info_onerror_1 () { |
---|
1603 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onerror.xml'); |
---|
1604 | try { |
---|
1605 | $feed = new XML_Feed_Parser($content); |
---|
1606 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1607 | $this->assertTrue(false); |
---|
1608 | return; |
---|
1609 | } |
---|
1610 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1611 | } |
---|
1612 | |
---|
1613 | function test_feed_info_onfocus_1 () { |
---|
1614 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onfocus.xml'); |
---|
1615 | try { |
---|
1616 | $feed = new XML_Feed_Parser($content); |
---|
1617 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1618 | $this->assertTrue(false); |
---|
1619 | return; |
---|
1620 | } |
---|
1621 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1622 | } |
---|
1623 | |
---|
1624 | function test_feed_info_onkeydown_1 () { |
---|
1625 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeydown.xml'); |
---|
1626 | try { |
---|
1627 | $feed = new XML_Feed_Parser($content); |
---|
1628 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1629 | $this->assertTrue(false); |
---|
1630 | return; |
---|
1631 | } |
---|
1632 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1633 | } |
---|
1634 | |
---|
1635 | function test_feed_info_onkeypress_1 () { |
---|
1636 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeypress.xml'); |
---|
1637 | try { |
---|
1638 | $feed = new XML_Feed_Parser($content); |
---|
1639 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1640 | $this->assertTrue(false); |
---|
1641 | return; |
---|
1642 | } |
---|
1643 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1644 | } |
---|
1645 | |
---|
1646 | function test_feed_info_onkeyup_1 () { |
---|
1647 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onkeyup.xml'); |
---|
1648 | try { |
---|
1649 | $feed = new XML_Feed_Parser($content); |
---|
1650 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1651 | $this->assertTrue(false); |
---|
1652 | return; |
---|
1653 | } |
---|
1654 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1655 | } |
---|
1656 | |
---|
1657 | function test_feed_info_onload_1 () { |
---|
1658 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onload.xml'); |
---|
1659 | try { |
---|
1660 | $feed = new XML_Feed_Parser($content); |
---|
1661 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1662 | $this->assertTrue(false); |
---|
1663 | return; |
---|
1664 | } |
---|
1665 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1666 | } |
---|
1667 | |
---|
1668 | function test_feed_info_onmousedown_1 () { |
---|
1669 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmousedown.xml'); |
---|
1670 | try { |
---|
1671 | $feed = new XML_Feed_Parser($content); |
---|
1672 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1673 | $this->assertTrue(false); |
---|
1674 | return; |
---|
1675 | } |
---|
1676 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1677 | } |
---|
1678 | |
---|
1679 | function test_feed_info_onmouseout_1 () { |
---|
1680 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseout.xml'); |
---|
1681 | try { |
---|
1682 | $feed = new XML_Feed_Parser($content); |
---|
1683 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1684 | $this->assertTrue(false); |
---|
1685 | return; |
---|
1686 | } |
---|
1687 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1688 | } |
---|
1689 | |
---|
1690 | function test_feed_info_onmouseover_1 () { |
---|
1691 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseover.xml'); |
---|
1692 | try { |
---|
1693 | $feed = new XML_Feed_Parser($content); |
---|
1694 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1695 | $this->assertTrue(false); |
---|
1696 | return; |
---|
1697 | } |
---|
1698 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1699 | } |
---|
1700 | |
---|
1701 | function test_feed_info_onmouseup_1 () { |
---|
1702 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onmouseup.xml'); |
---|
1703 | try { |
---|
1704 | $feed = new XML_Feed_Parser($content); |
---|
1705 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1706 | $this->assertTrue(false); |
---|
1707 | return; |
---|
1708 | } |
---|
1709 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1710 | } |
---|
1711 | |
---|
1712 | function test_feed_info_onreset_1 () { |
---|
1713 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onreset.xml'); |
---|
1714 | try { |
---|
1715 | $feed = new XML_Feed_Parser($content); |
---|
1716 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1717 | $this->assertTrue(false); |
---|
1718 | return; |
---|
1719 | } |
---|
1720 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1721 | } |
---|
1722 | |
---|
1723 | function test_feed_info_onresize_1 () { |
---|
1724 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onresize.xml'); |
---|
1725 | try { |
---|
1726 | $feed = new XML_Feed_Parser($content); |
---|
1727 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1728 | $this->assertTrue(false); |
---|
1729 | return; |
---|
1730 | } |
---|
1731 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1732 | } |
---|
1733 | |
---|
1734 | function test_feed_info_onsubmit_1 () { |
---|
1735 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onsubmit.xml'); |
---|
1736 | try { |
---|
1737 | $feed = new XML_Feed_Parser($content); |
---|
1738 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1739 | $this->assertTrue(false); |
---|
1740 | return; |
---|
1741 | } |
---|
1742 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1743 | } |
---|
1744 | |
---|
1745 | function test_feed_info_onunload_1 () { |
---|
1746 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_onunload.xml'); |
---|
1747 | try { |
---|
1748 | $feed = new XML_Feed_Parser($content); |
---|
1749 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1750 | $this->assertTrue(false); |
---|
1751 | return; |
---|
1752 | } |
---|
1753 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->info); |
---|
1754 | } |
---|
1755 | |
---|
1756 | function test_feed_info_script_1 () { |
---|
1757 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script.xml'); |
---|
1758 | try { |
---|
1759 | $feed = new XML_Feed_Parser($content); |
---|
1760 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1761 | $this->assertTrue(false); |
---|
1762 | return; |
---|
1763 | } |
---|
1764 | $this->assertEquals('safe description', $feed->info); |
---|
1765 | } |
---|
1766 | |
---|
1767 | function test_feed_info_script_cdata_1 () { |
---|
1768 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script_cdata.xml'); |
---|
1769 | try { |
---|
1770 | $feed = new XML_Feed_Parser($content); |
---|
1771 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1772 | $this->assertTrue(false); |
---|
1773 | return; |
---|
1774 | } |
---|
1775 | $this->assertEquals('safe description', $feed->info); |
---|
1776 | } |
---|
1777 | |
---|
1778 | function test_feed_info_script_inline_1 () { |
---|
1779 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_script_inline.xml'); |
---|
1780 | try { |
---|
1781 | $feed = new XML_Feed_Parser($content); |
---|
1782 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1783 | $this->assertTrue(false); |
---|
1784 | return; |
---|
1785 | } |
---|
1786 | $this->assertEquals('<div>safe description</div>', $feed->info); |
---|
1787 | } |
---|
1788 | |
---|
1789 | function test_feed_info_style_1 () { |
---|
1790 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_info_style.xml'); |
---|
1791 | try { |
---|
1792 | $feed = new XML_Feed_Parser($content); |
---|
1793 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1794 | $this->assertTrue(false); |
---|
1795 | return; |
---|
1796 | } |
---|
1797 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->info); |
---|
1798 | } |
---|
1799 | |
---|
1800 | function test_feed_subtitle_applet_1 () { |
---|
1801 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_applet.xml'); |
---|
1802 | try { |
---|
1803 | $feed = new XML_Feed_Parser($content); |
---|
1804 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1805 | $this->assertTrue(false); |
---|
1806 | return; |
---|
1807 | } |
---|
1808 | $this->assertEquals('safe description', $feed->tagline); |
---|
1809 | } |
---|
1810 | |
---|
1811 | function test_feed_subtitle_blink_1 () { |
---|
1812 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_blink.xml'); |
---|
1813 | try { |
---|
1814 | $feed = new XML_Feed_Parser($content); |
---|
1815 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1816 | $this->assertTrue(false); |
---|
1817 | return; |
---|
1818 | } |
---|
1819 | $this->assertEquals('safe description', $feed->tagline); |
---|
1820 | } |
---|
1821 | |
---|
1822 | function test_feed_subtitle_crazy_1 () { |
---|
1823 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_crazy.xml'); |
---|
1824 | try { |
---|
1825 | $feed = new XML_Feed_Parser($content); |
---|
1826 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1827 | $this->assertTrue(false); |
---|
1828 | return; |
---|
1829 | } |
---|
1830 | $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); |
---|
1831 | } |
---|
1832 | |
---|
1833 | function test_feed_subtitle_embed_1 () { |
---|
1834 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_embed.xml'); |
---|
1835 | try { |
---|
1836 | $feed = new XML_Feed_Parser($content); |
---|
1837 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1838 | $this->assertTrue(false); |
---|
1839 | return; |
---|
1840 | } |
---|
1841 | $this->assertEquals('safe description', $feed->tagline); |
---|
1842 | } |
---|
1843 | |
---|
1844 | function test_feed_subtitle_frame_1 () { |
---|
1845 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_frame.xml'); |
---|
1846 | try { |
---|
1847 | $feed = new XML_Feed_Parser($content); |
---|
1848 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1849 | $this->assertTrue(false); |
---|
1850 | return; |
---|
1851 | } |
---|
1852 | $this->assertEquals('safe description', $feed->tagline); |
---|
1853 | } |
---|
1854 | |
---|
1855 | function test_feed_subtitle_iframe_1 () { |
---|
1856 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_iframe.xml'); |
---|
1857 | try { |
---|
1858 | $feed = new XML_Feed_Parser($content); |
---|
1859 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1860 | $this->assertTrue(false); |
---|
1861 | return; |
---|
1862 | } |
---|
1863 | $this->assertEquals('safe description', $feed->tagline); |
---|
1864 | } |
---|
1865 | |
---|
1866 | function test_feed_subtitle_link_1 () { |
---|
1867 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_link.xml'); |
---|
1868 | try { |
---|
1869 | $feed = new XML_Feed_Parser($content); |
---|
1870 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1871 | $this->assertTrue(false); |
---|
1872 | return; |
---|
1873 | } |
---|
1874 | $this->assertEquals('safe description', $feed->tagline); |
---|
1875 | } |
---|
1876 | |
---|
1877 | function test_feed_subtitle_meta_1 () { |
---|
1878 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_meta.xml'); |
---|
1879 | try { |
---|
1880 | $feed = new XML_Feed_Parser($content); |
---|
1881 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1882 | $this->assertTrue(false); |
---|
1883 | return; |
---|
1884 | } |
---|
1885 | $this->assertEquals('safe description', $feed->tagline); |
---|
1886 | } |
---|
1887 | |
---|
1888 | function test_feed_subtitle_object_1 () { |
---|
1889 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_object.xml'); |
---|
1890 | try { |
---|
1891 | $feed = new XML_Feed_Parser($content); |
---|
1892 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1893 | $this->assertTrue(false); |
---|
1894 | return; |
---|
1895 | } |
---|
1896 | $this->assertEquals('safe description', $feed->tagline); |
---|
1897 | } |
---|
1898 | |
---|
1899 | function test_feed_subtitle_onabort_1 () { |
---|
1900 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onabort.xml'); |
---|
1901 | try { |
---|
1902 | $feed = new XML_Feed_Parser($content); |
---|
1903 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1904 | $this->assertTrue(false); |
---|
1905 | return; |
---|
1906 | } |
---|
1907 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1908 | } |
---|
1909 | |
---|
1910 | function test_feed_subtitle_onblur_1 () { |
---|
1911 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onblur.xml'); |
---|
1912 | try { |
---|
1913 | $feed = new XML_Feed_Parser($content); |
---|
1914 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1915 | $this->assertTrue(false); |
---|
1916 | return; |
---|
1917 | } |
---|
1918 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1919 | } |
---|
1920 | |
---|
1921 | function test_feed_subtitle_onchange_1 () { |
---|
1922 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onchange.xml'); |
---|
1923 | try { |
---|
1924 | $feed = new XML_Feed_Parser($content); |
---|
1925 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1926 | $this->assertTrue(false); |
---|
1927 | return; |
---|
1928 | } |
---|
1929 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1930 | } |
---|
1931 | |
---|
1932 | function test_feed_subtitle_onclick_1 () { |
---|
1933 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onclick.xml'); |
---|
1934 | try { |
---|
1935 | $feed = new XML_Feed_Parser($content); |
---|
1936 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1937 | $this->assertTrue(false); |
---|
1938 | return; |
---|
1939 | } |
---|
1940 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1941 | } |
---|
1942 | |
---|
1943 | function test_feed_subtitle_ondblclick_1 () { |
---|
1944 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_ondblclick.xml'); |
---|
1945 | try { |
---|
1946 | $feed = new XML_Feed_Parser($content); |
---|
1947 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1948 | $this->assertTrue(false); |
---|
1949 | return; |
---|
1950 | } |
---|
1951 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1952 | } |
---|
1953 | |
---|
1954 | function test_feed_subtitle_onerror_1 () { |
---|
1955 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onerror.xml'); |
---|
1956 | try { |
---|
1957 | $feed = new XML_Feed_Parser($content); |
---|
1958 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1959 | $this->assertTrue(false); |
---|
1960 | return; |
---|
1961 | } |
---|
1962 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1963 | } |
---|
1964 | |
---|
1965 | function test_feed_subtitle_onfocus_1 () { |
---|
1966 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onfocus.xml'); |
---|
1967 | try { |
---|
1968 | $feed = new XML_Feed_Parser($content); |
---|
1969 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1970 | $this->assertTrue(false); |
---|
1971 | return; |
---|
1972 | } |
---|
1973 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1974 | } |
---|
1975 | |
---|
1976 | function test_feed_subtitle_onkeydown_1 () { |
---|
1977 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeydown.xml'); |
---|
1978 | try { |
---|
1979 | $feed = new XML_Feed_Parser($content); |
---|
1980 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1981 | $this->assertTrue(false); |
---|
1982 | return; |
---|
1983 | } |
---|
1984 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1985 | } |
---|
1986 | |
---|
1987 | function test_feed_subtitle_onkeypress_1 () { |
---|
1988 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeypress.xml'); |
---|
1989 | try { |
---|
1990 | $feed = new XML_Feed_Parser($content); |
---|
1991 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1992 | $this->assertTrue(false); |
---|
1993 | return; |
---|
1994 | } |
---|
1995 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
1996 | } |
---|
1997 | |
---|
1998 | function test_feed_subtitle_onkeyup_1 () { |
---|
1999 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onkeyup.xml'); |
---|
2000 | try { |
---|
2001 | $feed = new XML_Feed_Parser($content); |
---|
2002 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2003 | $this->assertTrue(false); |
---|
2004 | return; |
---|
2005 | } |
---|
2006 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2007 | } |
---|
2008 | |
---|
2009 | function test_feed_subtitle_onload_1 () { |
---|
2010 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onload.xml'); |
---|
2011 | try { |
---|
2012 | $feed = new XML_Feed_Parser($content); |
---|
2013 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2014 | $this->assertTrue(false); |
---|
2015 | return; |
---|
2016 | } |
---|
2017 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2018 | } |
---|
2019 | |
---|
2020 | function test_feed_subtitle_onmousedown_1 () { |
---|
2021 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmousedown.xml'); |
---|
2022 | try { |
---|
2023 | $feed = new XML_Feed_Parser($content); |
---|
2024 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2025 | $this->assertTrue(false); |
---|
2026 | return; |
---|
2027 | } |
---|
2028 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2029 | } |
---|
2030 | |
---|
2031 | function test_feed_subtitle_onmouseout_1 () { |
---|
2032 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseout.xml'); |
---|
2033 | try { |
---|
2034 | $feed = new XML_Feed_Parser($content); |
---|
2035 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2036 | $this->assertTrue(false); |
---|
2037 | return; |
---|
2038 | } |
---|
2039 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2040 | } |
---|
2041 | |
---|
2042 | function test_feed_subtitle_onmouseover_1 () { |
---|
2043 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseover.xml'); |
---|
2044 | try { |
---|
2045 | $feed = new XML_Feed_Parser($content); |
---|
2046 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2047 | $this->assertTrue(false); |
---|
2048 | return; |
---|
2049 | } |
---|
2050 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2051 | } |
---|
2052 | |
---|
2053 | function test_feed_subtitle_onmouseup_1 () { |
---|
2054 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onmouseup.xml'); |
---|
2055 | try { |
---|
2056 | $feed = new XML_Feed_Parser($content); |
---|
2057 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2058 | $this->assertTrue(false); |
---|
2059 | return; |
---|
2060 | } |
---|
2061 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2062 | } |
---|
2063 | |
---|
2064 | function test_feed_subtitle_onreset_1 () { |
---|
2065 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onreset.xml'); |
---|
2066 | try { |
---|
2067 | $feed = new XML_Feed_Parser($content); |
---|
2068 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2069 | $this->assertTrue(false); |
---|
2070 | return; |
---|
2071 | } |
---|
2072 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2073 | } |
---|
2074 | |
---|
2075 | function test_feed_subtitle_onresize_1 () { |
---|
2076 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onresize.xml'); |
---|
2077 | try { |
---|
2078 | $feed = new XML_Feed_Parser($content); |
---|
2079 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2080 | $this->assertTrue(false); |
---|
2081 | return; |
---|
2082 | } |
---|
2083 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2084 | } |
---|
2085 | |
---|
2086 | function test_feed_subtitle_onsubmit_1 () { |
---|
2087 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onsubmit.xml'); |
---|
2088 | try { |
---|
2089 | $feed = new XML_Feed_Parser($content); |
---|
2090 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2091 | $this->assertTrue(false); |
---|
2092 | return; |
---|
2093 | } |
---|
2094 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2095 | } |
---|
2096 | |
---|
2097 | function test_feed_subtitle_onunload_1 () { |
---|
2098 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_onunload.xml'); |
---|
2099 | try { |
---|
2100 | $feed = new XML_Feed_Parser($content); |
---|
2101 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2102 | $this->assertTrue(false); |
---|
2103 | return; |
---|
2104 | } |
---|
2105 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2106 | } |
---|
2107 | |
---|
2108 | function test_feed_subtitle_script_1 () { |
---|
2109 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script.xml'); |
---|
2110 | try { |
---|
2111 | $feed = new XML_Feed_Parser($content); |
---|
2112 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2113 | $this->assertTrue(false); |
---|
2114 | return; |
---|
2115 | } |
---|
2116 | $this->assertEquals('safe description', $feed->tagline); |
---|
2117 | } |
---|
2118 | |
---|
2119 | function test_feed_subtitle_script_cdata_1 () { |
---|
2120 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script_cdata.xml'); |
---|
2121 | try { |
---|
2122 | $feed = new XML_Feed_Parser($content); |
---|
2123 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2124 | $this->assertTrue(false); |
---|
2125 | return; |
---|
2126 | } |
---|
2127 | $this->assertEquals('safe description', $feed->tagline); |
---|
2128 | } |
---|
2129 | |
---|
2130 | function test_feed_subtitle_script_inline_1 () { |
---|
2131 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_script_inline.xml'); |
---|
2132 | try { |
---|
2133 | $feed = new XML_Feed_Parser($content); |
---|
2134 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2135 | $this->assertTrue(false); |
---|
2136 | return; |
---|
2137 | } |
---|
2138 | $this->assertEquals('<div>safe description</div>', $feed->tagline); |
---|
2139 | } |
---|
2140 | |
---|
2141 | function test_feed_subtitle_style_1 () { |
---|
2142 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_subtitle_style.xml'); |
---|
2143 | try { |
---|
2144 | $feed = new XML_Feed_Parser($content); |
---|
2145 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2146 | $this->assertTrue(false); |
---|
2147 | return; |
---|
2148 | } |
---|
2149 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->tagline); |
---|
2150 | } |
---|
2151 | |
---|
2152 | function test_feed_tagline_applet_1 () { |
---|
2153 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_applet.xml'); |
---|
2154 | try { |
---|
2155 | $feed = new XML_Feed_Parser($content); |
---|
2156 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2157 | $this->assertTrue(false); |
---|
2158 | return; |
---|
2159 | } |
---|
2160 | $this->assertEquals('safe description', $feed->tagline); |
---|
2161 | } |
---|
2162 | |
---|
2163 | function test_feed_tagline_blink_1 () { |
---|
2164 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_blink.xml'); |
---|
2165 | try { |
---|
2166 | $feed = new XML_Feed_Parser($content); |
---|
2167 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2168 | $this->assertTrue(false); |
---|
2169 | return; |
---|
2170 | } |
---|
2171 | $this->assertEquals('safe description', $feed->tagline); |
---|
2172 | } |
---|
2173 | |
---|
2174 | function test_feed_tagline_crazy_1 () { |
---|
2175 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_crazy.xml'); |
---|
2176 | try { |
---|
2177 | $feed = new XML_Feed_Parser($content); |
---|
2178 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2179 | $this->assertTrue(false); |
---|
2180 | return; |
---|
2181 | } |
---|
2182 | $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); |
---|
2183 | } |
---|
2184 | |
---|
2185 | function test_feed_tagline_embed_1 () { |
---|
2186 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_embed.xml'); |
---|
2187 | try { |
---|
2188 | $feed = new XML_Feed_Parser($content); |
---|
2189 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2190 | $this->assertTrue(false); |
---|
2191 | return; |
---|
2192 | } |
---|
2193 | $this->assertEquals('safe description', $feed->tagline); |
---|
2194 | } |
---|
2195 | |
---|
2196 | function test_feed_tagline_frame_1 () { |
---|
2197 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_frame.xml'); |
---|
2198 | try { |
---|
2199 | $feed = new XML_Feed_Parser($content); |
---|
2200 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2201 | $this->assertTrue(false); |
---|
2202 | return; |
---|
2203 | } |
---|
2204 | $this->assertEquals('safe description', $feed->tagline); |
---|
2205 | } |
---|
2206 | |
---|
2207 | function test_feed_tagline_iframe_1 () { |
---|
2208 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_iframe.xml'); |
---|
2209 | try { |
---|
2210 | $feed = new XML_Feed_Parser($content); |
---|
2211 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2212 | $this->assertTrue(false); |
---|
2213 | return; |
---|
2214 | } |
---|
2215 | $this->assertEquals('safe description', $feed->tagline); |
---|
2216 | } |
---|
2217 | |
---|
2218 | function test_feed_tagline_link_1 () { |
---|
2219 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_link.xml'); |
---|
2220 | try { |
---|
2221 | $feed = new XML_Feed_Parser($content); |
---|
2222 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2223 | $this->assertTrue(false); |
---|
2224 | return; |
---|
2225 | } |
---|
2226 | $this->assertEquals('safe description', $feed->tagline); |
---|
2227 | } |
---|
2228 | |
---|
2229 | function test_feed_tagline_meta_1 () { |
---|
2230 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_meta.xml'); |
---|
2231 | try { |
---|
2232 | $feed = new XML_Feed_Parser($content); |
---|
2233 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2234 | $this->assertTrue(false); |
---|
2235 | return; |
---|
2236 | } |
---|
2237 | $this->assertEquals('safe description', $feed->tagline); |
---|
2238 | } |
---|
2239 | |
---|
2240 | function test_feed_tagline_object_1 () { |
---|
2241 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_object.xml'); |
---|
2242 | try { |
---|
2243 | $feed = new XML_Feed_Parser($content); |
---|
2244 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2245 | $this->assertTrue(false); |
---|
2246 | return; |
---|
2247 | } |
---|
2248 | $this->assertEquals('safe description', $feed->tagline); |
---|
2249 | } |
---|
2250 | |
---|
2251 | function test_feed_tagline_onabort_1 () { |
---|
2252 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onabort.xml'); |
---|
2253 | try { |
---|
2254 | $feed = new XML_Feed_Parser($content); |
---|
2255 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2256 | $this->assertTrue(false); |
---|
2257 | return; |
---|
2258 | } |
---|
2259 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2260 | } |
---|
2261 | |
---|
2262 | function test_feed_tagline_onblur_1 () { |
---|
2263 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onblur.xml'); |
---|
2264 | try { |
---|
2265 | $feed = new XML_Feed_Parser($content); |
---|
2266 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2267 | $this->assertTrue(false); |
---|
2268 | return; |
---|
2269 | } |
---|
2270 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2271 | } |
---|
2272 | |
---|
2273 | function test_feed_tagline_onchange_1 () { |
---|
2274 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onchange.xml'); |
---|
2275 | try { |
---|
2276 | $feed = new XML_Feed_Parser($content); |
---|
2277 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2278 | $this->assertTrue(false); |
---|
2279 | return; |
---|
2280 | } |
---|
2281 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2282 | } |
---|
2283 | |
---|
2284 | function test_feed_tagline_onclick_1 () { |
---|
2285 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onclick.xml'); |
---|
2286 | try { |
---|
2287 | $feed = new XML_Feed_Parser($content); |
---|
2288 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2289 | $this->assertTrue(false); |
---|
2290 | return; |
---|
2291 | } |
---|
2292 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2293 | } |
---|
2294 | |
---|
2295 | function test_feed_tagline_ondblclick_1 () { |
---|
2296 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_ondblclick.xml'); |
---|
2297 | try { |
---|
2298 | $feed = new XML_Feed_Parser($content); |
---|
2299 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2300 | $this->assertTrue(false); |
---|
2301 | return; |
---|
2302 | } |
---|
2303 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2304 | } |
---|
2305 | |
---|
2306 | function test_feed_tagline_onerror_1 () { |
---|
2307 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onerror.xml'); |
---|
2308 | try { |
---|
2309 | $feed = new XML_Feed_Parser($content); |
---|
2310 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2311 | $this->assertTrue(false); |
---|
2312 | return; |
---|
2313 | } |
---|
2314 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2315 | } |
---|
2316 | |
---|
2317 | function test_feed_tagline_onfocus_1 () { |
---|
2318 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onfocus.xml'); |
---|
2319 | try { |
---|
2320 | $feed = new XML_Feed_Parser($content); |
---|
2321 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2322 | $this->assertTrue(false); |
---|
2323 | return; |
---|
2324 | } |
---|
2325 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2326 | } |
---|
2327 | |
---|
2328 | function test_feed_tagline_onkeydown_1 () { |
---|
2329 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeydown.xml'); |
---|
2330 | try { |
---|
2331 | $feed = new XML_Feed_Parser($content); |
---|
2332 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2333 | $this->assertTrue(false); |
---|
2334 | return; |
---|
2335 | } |
---|
2336 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2337 | } |
---|
2338 | |
---|
2339 | function test_feed_tagline_onkeypress_1 () { |
---|
2340 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeypress.xml'); |
---|
2341 | try { |
---|
2342 | $feed = new XML_Feed_Parser($content); |
---|
2343 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2344 | $this->assertTrue(false); |
---|
2345 | return; |
---|
2346 | } |
---|
2347 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2348 | } |
---|
2349 | |
---|
2350 | function test_feed_tagline_onkeyup_1 () { |
---|
2351 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onkeyup.xml'); |
---|
2352 | try { |
---|
2353 | $feed = new XML_Feed_Parser($content); |
---|
2354 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2355 | $this->assertTrue(false); |
---|
2356 | return; |
---|
2357 | } |
---|
2358 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2359 | } |
---|
2360 | |
---|
2361 | function test_feed_tagline_onload_1 () { |
---|
2362 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onload.xml'); |
---|
2363 | try { |
---|
2364 | $feed = new XML_Feed_Parser($content); |
---|
2365 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2366 | $this->assertTrue(false); |
---|
2367 | return; |
---|
2368 | } |
---|
2369 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2370 | } |
---|
2371 | |
---|
2372 | function test_feed_tagline_onmousedown_1 () { |
---|
2373 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmousedown.xml'); |
---|
2374 | try { |
---|
2375 | $feed = new XML_Feed_Parser($content); |
---|
2376 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2377 | $this->assertTrue(false); |
---|
2378 | return; |
---|
2379 | } |
---|
2380 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2381 | } |
---|
2382 | |
---|
2383 | function test_feed_tagline_onmouseout_1 () { |
---|
2384 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseout.xml'); |
---|
2385 | try { |
---|
2386 | $feed = new XML_Feed_Parser($content); |
---|
2387 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2388 | $this->assertTrue(false); |
---|
2389 | return; |
---|
2390 | } |
---|
2391 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2392 | } |
---|
2393 | |
---|
2394 | function test_feed_tagline_onmouseover_1 () { |
---|
2395 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseover.xml'); |
---|
2396 | try { |
---|
2397 | $feed = new XML_Feed_Parser($content); |
---|
2398 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2399 | $this->assertTrue(false); |
---|
2400 | return; |
---|
2401 | } |
---|
2402 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2403 | } |
---|
2404 | |
---|
2405 | function test_feed_tagline_onmouseup_1 () { |
---|
2406 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onmouseup.xml'); |
---|
2407 | try { |
---|
2408 | $feed = new XML_Feed_Parser($content); |
---|
2409 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2410 | $this->assertTrue(false); |
---|
2411 | return; |
---|
2412 | } |
---|
2413 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2414 | } |
---|
2415 | |
---|
2416 | function test_feed_tagline_onreset_1 () { |
---|
2417 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onreset.xml'); |
---|
2418 | try { |
---|
2419 | $feed = new XML_Feed_Parser($content); |
---|
2420 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2421 | $this->assertTrue(false); |
---|
2422 | return; |
---|
2423 | } |
---|
2424 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2425 | } |
---|
2426 | |
---|
2427 | function test_feed_tagline_onresize_1 () { |
---|
2428 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onresize.xml'); |
---|
2429 | try { |
---|
2430 | $feed = new XML_Feed_Parser($content); |
---|
2431 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2432 | $this->assertTrue(false); |
---|
2433 | return; |
---|
2434 | } |
---|
2435 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2436 | } |
---|
2437 | |
---|
2438 | function test_feed_tagline_onsubmit_1 () { |
---|
2439 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onsubmit.xml'); |
---|
2440 | try { |
---|
2441 | $feed = new XML_Feed_Parser($content); |
---|
2442 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2443 | $this->assertTrue(false); |
---|
2444 | return; |
---|
2445 | } |
---|
2446 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2447 | } |
---|
2448 | |
---|
2449 | function test_feed_tagline_onunload_1 () { |
---|
2450 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_onunload.xml'); |
---|
2451 | try { |
---|
2452 | $feed = new XML_Feed_Parser($content); |
---|
2453 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2454 | $this->assertTrue(false); |
---|
2455 | return; |
---|
2456 | } |
---|
2457 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->tagline); |
---|
2458 | } |
---|
2459 | |
---|
2460 | function test_feed_tagline_script_1 () { |
---|
2461 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script.xml'); |
---|
2462 | try { |
---|
2463 | $feed = new XML_Feed_Parser($content); |
---|
2464 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2465 | $this->assertTrue(false); |
---|
2466 | return; |
---|
2467 | } |
---|
2468 | $this->assertEquals('safe description', $feed->tagline); |
---|
2469 | } |
---|
2470 | |
---|
2471 | function test_feed_tagline_script_cdata_1 () { |
---|
2472 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_cdata.xml'); |
---|
2473 | try { |
---|
2474 | $feed = new XML_Feed_Parser($content); |
---|
2475 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2476 | $this->assertTrue(false); |
---|
2477 | return; |
---|
2478 | } |
---|
2479 | $this->assertEquals('safe description', $feed->tagline); |
---|
2480 | } |
---|
2481 | |
---|
2482 | function test_feed_tagline_script_inline_1 () { |
---|
2483 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_inline.xml'); |
---|
2484 | try { |
---|
2485 | $feed = new XML_Feed_Parser($content); |
---|
2486 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2487 | $this->assertTrue(false); |
---|
2488 | return; |
---|
2489 | } |
---|
2490 | $this->assertEquals('<div>safe description</div>', $feed->tagline); |
---|
2491 | } |
---|
2492 | |
---|
2493 | function test_feed_tagline_script_map_description_1 () { |
---|
2494 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_script_map_description.xml'); |
---|
2495 | try { |
---|
2496 | $feed = new XML_Feed_Parser($content); |
---|
2497 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2498 | $this->assertTrue(false); |
---|
2499 | return; |
---|
2500 | } |
---|
2501 | $this->assertEquals('safe description', $feed->description); |
---|
2502 | } |
---|
2503 | |
---|
2504 | function test_feed_tagline_style_1 () { |
---|
2505 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_tagline_style.xml'); |
---|
2506 | try { |
---|
2507 | $feed = new XML_Feed_Parser($content); |
---|
2508 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2509 | $this->assertTrue(false); |
---|
2510 | return; |
---|
2511 | } |
---|
2512 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->tagline); |
---|
2513 | } |
---|
2514 | |
---|
2515 | function test_feed_title_applet_1 () { |
---|
2516 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_applet.xml'); |
---|
2517 | try { |
---|
2518 | $feed = new XML_Feed_Parser($content); |
---|
2519 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2520 | $this->assertTrue(false); |
---|
2521 | return; |
---|
2522 | } |
---|
2523 | $this->assertEquals('safe description', $feed->title); |
---|
2524 | } |
---|
2525 | |
---|
2526 | function test_feed_title_blink_1 () { |
---|
2527 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_blink.xml'); |
---|
2528 | try { |
---|
2529 | $feed = new XML_Feed_Parser($content); |
---|
2530 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2531 | $this->assertTrue(false); |
---|
2532 | return; |
---|
2533 | } |
---|
2534 | $this->assertEquals('safe description', $feed->title); |
---|
2535 | } |
---|
2536 | |
---|
2537 | function test_feed_title_crazy_1 () { |
---|
2538 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_crazy.xml'); |
---|
2539 | try { |
---|
2540 | $feed = new XML_Feed_Parser($content); |
---|
2541 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2542 | $this->assertTrue(false); |
---|
2543 | return; |
---|
2544 | } |
---|
2545 | $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); |
---|
2546 | } |
---|
2547 | |
---|
2548 | function test_feed_title_embed_1 () { |
---|
2549 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_embed.xml'); |
---|
2550 | try { |
---|
2551 | $feed = new XML_Feed_Parser($content); |
---|
2552 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2553 | $this->assertTrue(false); |
---|
2554 | return; |
---|
2555 | } |
---|
2556 | $this->assertEquals('safe description', $feed->title); |
---|
2557 | } |
---|
2558 | |
---|
2559 | function test_feed_title_frame_1 () { |
---|
2560 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_frame.xml'); |
---|
2561 | try { |
---|
2562 | $feed = new XML_Feed_Parser($content); |
---|
2563 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2564 | $this->assertTrue(false); |
---|
2565 | return; |
---|
2566 | } |
---|
2567 | $this->assertEquals('safe description', $feed->title); |
---|
2568 | } |
---|
2569 | |
---|
2570 | function test_feed_title_iframe_1 () { |
---|
2571 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_iframe.xml'); |
---|
2572 | try { |
---|
2573 | $feed = new XML_Feed_Parser($content); |
---|
2574 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2575 | $this->assertTrue(false); |
---|
2576 | return; |
---|
2577 | } |
---|
2578 | $this->assertEquals('safe description', $feed->title); |
---|
2579 | } |
---|
2580 | |
---|
2581 | function test_feed_title_link_1 () { |
---|
2582 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_link.xml'); |
---|
2583 | try { |
---|
2584 | $feed = new XML_Feed_Parser($content); |
---|
2585 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2586 | $this->assertTrue(false); |
---|
2587 | return; |
---|
2588 | } |
---|
2589 | $this->assertEquals('safe description', $feed->title); |
---|
2590 | } |
---|
2591 | |
---|
2592 | function test_feed_title_meta_1 () { |
---|
2593 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_meta.xml'); |
---|
2594 | try { |
---|
2595 | $feed = new XML_Feed_Parser($content); |
---|
2596 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2597 | $this->assertTrue(false); |
---|
2598 | return; |
---|
2599 | } |
---|
2600 | $this->assertEquals('safe description', $feed->title); |
---|
2601 | } |
---|
2602 | |
---|
2603 | function test_feed_title_object_1 () { |
---|
2604 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_object.xml'); |
---|
2605 | try { |
---|
2606 | $feed = new XML_Feed_Parser($content); |
---|
2607 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2608 | $this->assertTrue(false); |
---|
2609 | return; |
---|
2610 | } |
---|
2611 | $this->assertEquals('safe description', $feed->title); |
---|
2612 | } |
---|
2613 | |
---|
2614 | function test_feed_title_onabort_1 () { |
---|
2615 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onabort.xml'); |
---|
2616 | try { |
---|
2617 | $feed = new XML_Feed_Parser($content); |
---|
2618 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2619 | $this->assertTrue(false); |
---|
2620 | return; |
---|
2621 | } |
---|
2622 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2623 | } |
---|
2624 | |
---|
2625 | function test_feed_title_onblur_1 () { |
---|
2626 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onblur.xml'); |
---|
2627 | try { |
---|
2628 | $feed = new XML_Feed_Parser($content); |
---|
2629 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2630 | $this->assertTrue(false); |
---|
2631 | return; |
---|
2632 | } |
---|
2633 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2634 | } |
---|
2635 | |
---|
2636 | function test_feed_title_onchange_1 () { |
---|
2637 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onchange.xml'); |
---|
2638 | try { |
---|
2639 | $feed = new XML_Feed_Parser($content); |
---|
2640 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2641 | $this->assertTrue(false); |
---|
2642 | return; |
---|
2643 | } |
---|
2644 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2645 | } |
---|
2646 | |
---|
2647 | function test_feed_title_onclick_1 () { |
---|
2648 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onclick.xml'); |
---|
2649 | try { |
---|
2650 | $feed = new XML_Feed_Parser($content); |
---|
2651 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2652 | $this->assertTrue(false); |
---|
2653 | return; |
---|
2654 | } |
---|
2655 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2656 | } |
---|
2657 | |
---|
2658 | function test_feed_title_ondblclick_1 () { |
---|
2659 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_ondblclick.xml'); |
---|
2660 | try { |
---|
2661 | $feed = new XML_Feed_Parser($content); |
---|
2662 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2663 | $this->assertTrue(false); |
---|
2664 | return; |
---|
2665 | } |
---|
2666 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2667 | } |
---|
2668 | |
---|
2669 | function test_feed_title_onerror_1 () { |
---|
2670 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onerror.xml'); |
---|
2671 | try { |
---|
2672 | $feed = new XML_Feed_Parser($content); |
---|
2673 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2674 | $this->assertTrue(false); |
---|
2675 | return; |
---|
2676 | } |
---|
2677 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2678 | } |
---|
2679 | |
---|
2680 | function test_feed_title_onfocus_1 () { |
---|
2681 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onfocus.xml'); |
---|
2682 | try { |
---|
2683 | $feed = new XML_Feed_Parser($content); |
---|
2684 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2685 | $this->assertTrue(false); |
---|
2686 | return; |
---|
2687 | } |
---|
2688 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2689 | } |
---|
2690 | |
---|
2691 | function test_feed_title_onkeydown_1 () { |
---|
2692 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeydown.xml'); |
---|
2693 | try { |
---|
2694 | $feed = new XML_Feed_Parser($content); |
---|
2695 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2696 | $this->assertTrue(false); |
---|
2697 | return; |
---|
2698 | } |
---|
2699 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2700 | } |
---|
2701 | |
---|
2702 | function test_feed_title_onkeypress_1 () { |
---|
2703 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeypress.xml'); |
---|
2704 | try { |
---|
2705 | $feed = new XML_Feed_Parser($content); |
---|
2706 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2707 | $this->assertTrue(false); |
---|
2708 | return; |
---|
2709 | } |
---|
2710 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2711 | } |
---|
2712 | |
---|
2713 | function test_feed_title_onkeyup_1 () { |
---|
2714 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onkeyup.xml'); |
---|
2715 | try { |
---|
2716 | $feed = new XML_Feed_Parser($content); |
---|
2717 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2718 | $this->assertTrue(false); |
---|
2719 | return; |
---|
2720 | } |
---|
2721 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2722 | } |
---|
2723 | |
---|
2724 | function test_feed_title_onload_1 () { |
---|
2725 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onload.xml'); |
---|
2726 | try { |
---|
2727 | $feed = new XML_Feed_Parser($content); |
---|
2728 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2729 | $this->assertTrue(false); |
---|
2730 | return; |
---|
2731 | } |
---|
2732 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2733 | } |
---|
2734 | |
---|
2735 | function test_feed_title_onmousedown_1 () { |
---|
2736 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmousedown.xml'); |
---|
2737 | try { |
---|
2738 | $feed = new XML_Feed_Parser($content); |
---|
2739 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2740 | $this->assertTrue(false); |
---|
2741 | return; |
---|
2742 | } |
---|
2743 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2744 | } |
---|
2745 | |
---|
2746 | function test_feed_title_onmouseout_1 () { |
---|
2747 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseout.xml'); |
---|
2748 | try { |
---|
2749 | $feed = new XML_Feed_Parser($content); |
---|
2750 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2751 | $this->assertTrue(false); |
---|
2752 | return; |
---|
2753 | } |
---|
2754 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2755 | } |
---|
2756 | |
---|
2757 | function test_feed_title_onmouseover_1 () { |
---|
2758 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseover.xml'); |
---|
2759 | try { |
---|
2760 | $feed = new XML_Feed_Parser($content); |
---|
2761 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2762 | $this->assertTrue(false); |
---|
2763 | return; |
---|
2764 | } |
---|
2765 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2766 | } |
---|
2767 | |
---|
2768 | function test_feed_title_onmouseup_1 () { |
---|
2769 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onmouseup.xml'); |
---|
2770 | try { |
---|
2771 | $feed = new XML_Feed_Parser($content); |
---|
2772 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2773 | $this->assertTrue(false); |
---|
2774 | return; |
---|
2775 | } |
---|
2776 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2777 | } |
---|
2778 | |
---|
2779 | function test_feed_title_onreset_1 () { |
---|
2780 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onreset.xml'); |
---|
2781 | try { |
---|
2782 | $feed = new XML_Feed_Parser($content); |
---|
2783 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2784 | $this->assertTrue(false); |
---|
2785 | return; |
---|
2786 | } |
---|
2787 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2788 | } |
---|
2789 | |
---|
2790 | function test_feed_title_onresize_1 () { |
---|
2791 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onresize.xml'); |
---|
2792 | try { |
---|
2793 | $feed = new XML_Feed_Parser($content); |
---|
2794 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2795 | $this->assertTrue(false); |
---|
2796 | return; |
---|
2797 | } |
---|
2798 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2799 | } |
---|
2800 | |
---|
2801 | function test_feed_title_onsubmit_1 () { |
---|
2802 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onsubmit.xml'); |
---|
2803 | try { |
---|
2804 | $feed = new XML_Feed_Parser($content); |
---|
2805 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2806 | $this->assertTrue(false); |
---|
2807 | return; |
---|
2808 | } |
---|
2809 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2810 | } |
---|
2811 | |
---|
2812 | function test_feed_title_onunload_1 () { |
---|
2813 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_onunload.xml'); |
---|
2814 | try { |
---|
2815 | $feed = new XML_Feed_Parser($content); |
---|
2816 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2817 | $this->assertTrue(false); |
---|
2818 | return; |
---|
2819 | } |
---|
2820 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->title); |
---|
2821 | } |
---|
2822 | |
---|
2823 | function test_feed_title_script_1 () { |
---|
2824 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script.xml'); |
---|
2825 | try { |
---|
2826 | $feed = new XML_Feed_Parser($content); |
---|
2827 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2828 | $this->assertTrue(false); |
---|
2829 | return; |
---|
2830 | } |
---|
2831 | $this->assertEquals('safe description', $feed->title); |
---|
2832 | } |
---|
2833 | |
---|
2834 | function test_feed_title_script_cdata_1 () { |
---|
2835 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script_cdata.xml'); |
---|
2836 | try { |
---|
2837 | $feed = new XML_Feed_Parser($content); |
---|
2838 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2839 | $this->assertTrue(false); |
---|
2840 | return; |
---|
2841 | } |
---|
2842 | $this->assertEquals('safe description', $feed->title); |
---|
2843 | } |
---|
2844 | |
---|
2845 | function test_feed_title_script_inline_1 () { |
---|
2846 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_script_inline.xml'); |
---|
2847 | try { |
---|
2848 | $feed = new XML_Feed_Parser($content); |
---|
2849 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2850 | $this->assertTrue(false); |
---|
2851 | return; |
---|
2852 | } |
---|
2853 | $this->assertEquals('<div>safe description</div>', $feed->title); |
---|
2854 | } |
---|
2855 | |
---|
2856 | function test_feed_title_style_1 () { |
---|
2857 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/feed_title_style.xml'); |
---|
2858 | try { |
---|
2859 | $feed = new XML_Feed_Parser($content); |
---|
2860 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2861 | $this->assertTrue(false); |
---|
2862 | return; |
---|
2863 | } |
---|
2864 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->title); |
---|
2865 | } |
---|
2866 | |
---|
2867 | function test_item_body_applet_1 () { |
---|
2868 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_applet.xml'); |
---|
2869 | try { |
---|
2870 | $feed = new XML_Feed_Parser($content); |
---|
2871 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2872 | $this->assertTrue(false); |
---|
2873 | return; |
---|
2874 | } |
---|
2875 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2876 | } |
---|
2877 | |
---|
2878 | function test_item_body_blink_1 () { |
---|
2879 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_blink.xml'); |
---|
2880 | try { |
---|
2881 | $feed = new XML_Feed_Parser($content); |
---|
2882 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2883 | $this->assertTrue(false); |
---|
2884 | return; |
---|
2885 | } |
---|
2886 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2887 | } |
---|
2888 | |
---|
2889 | function test_item_body_embed_1 () { |
---|
2890 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_embed.xml'); |
---|
2891 | try { |
---|
2892 | $feed = new XML_Feed_Parser($content); |
---|
2893 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2894 | $this->assertTrue(false); |
---|
2895 | return; |
---|
2896 | } |
---|
2897 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2898 | } |
---|
2899 | |
---|
2900 | function test_item_body_frame_1 () { |
---|
2901 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_frame.xml'); |
---|
2902 | try { |
---|
2903 | $feed = new XML_Feed_Parser($content); |
---|
2904 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2905 | $this->assertTrue(false); |
---|
2906 | return; |
---|
2907 | } |
---|
2908 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2909 | } |
---|
2910 | |
---|
2911 | function test_item_body_iframe_1 () { |
---|
2912 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_iframe.xml'); |
---|
2913 | try { |
---|
2914 | $feed = new XML_Feed_Parser($content); |
---|
2915 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2916 | $this->assertTrue(false); |
---|
2917 | return; |
---|
2918 | } |
---|
2919 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2920 | } |
---|
2921 | |
---|
2922 | function test_item_body_link_1 () { |
---|
2923 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_link.xml'); |
---|
2924 | try { |
---|
2925 | $feed = new XML_Feed_Parser($content); |
---|
2926 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2927 | $this->assertTrue(false); |
---|
2928 | return; |
---|
2929 | } |
---|
2930 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2931 | } |
---|
2932 | |
---|
2933 | function test_item_body_meta_1 () { |
---|
2934 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_meta.xml'); |
---|
2935 | try { |
---|
2936 | $feed = new XML_Feed_Parser($content); |
---|
2937 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2938 | $this->assertTrue(false); |
---|
2939 | return; |
---|
2940 | } |
---|
2941 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2942 | } |
---|
2943 | |
---|
2944 | function test_item_body_object_1 () { |
---|
2945 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_object.xml'); |
---|
2946 | try { |
---|
2947 | $feed = new XML_Feed_Parser($content); |
---|
2948 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2949 | $this->assertTrue(false); |
---|
2950 | return; |
---|
2951 | } |
---|
2952 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
2953 | } |
---|
2954 | |
---|
2955 | function test_item_body_onabort_1 () { |
---|
2956 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onabort.xml'); |
---|
2957 | try { |
---|
2958 | $feed = new XML_Feed_Parser($content); |
---|
2959 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2960 | $this->assertTrue(false); |
---|
2961 | return; |
---|
2962 | } |
---|
2963 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
2964 | } |
---|
2965 | |
---|
2966 | function test_item_body_onblur_1 () { |
---|
2967 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onblur.xml'); |
---|
2968 | try { |
---|
2969 | $feed = new XML_Feed_Parser($content); |
---|
2970 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2971 | $this->assertTrue(false); |
---|
2972 | return; |
---|
2973 | } |
---|
2974 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
2975 | } |
---|
2976 | |
---|
2977 | function test_item_body_onchange_1 () { |
---|
2978 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onchange.xml'); |
---|
2979 | try { |
---|
2980 | $feed = new XML_Feed_Parser($content); |
---|
2981 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2982 | $this->assertTrue(false); |
---|
2983 | return; |
---|
2984 | } |
---|
2985 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
2986 | } |
---|
2987 | |
---|
2988 | function test_item_body_onclick_1 () { |
---|
2989 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onclick.xml'); |
---|
2990 | try { |
---|
2991 | $feed = new XML_Feed_Parser($content); |
---|
2992 | } catch (XML_Feed_Parser_Exception $e) { |
---|
2993 | $this->assertTrue(false); |
---|
2994 | return; |
---|
2995 | } |
---|
2996 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
2997 | } |
---|
2998 | |
---|
2999 | function test_item_body_ondblclick_1 () { |
---|
3000 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_ondblclick.xml'); |
---|
3001 | try { |
---|
3002 | $feed = new XML_Feed_Parser($content); |
---|
3003 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3004 | $this->assertTrue(false); |
---|
3005 | return; |
---|
3006 | } |
---|
3007 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3008 | } |
---|
3009 | |
---|
3010 | function test_item_body_onerror_1 () { |
---|
3011 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onerror.xml'); |
---|
3012 | try { |
---|
3013 | $feed = new XML_Feed_Parser($content); |
---|
3014 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3015 | $this->assertTrue(false); |
---|
3016 | return; |
---|
3017 | } |
---|
3018 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3019 | } |
---|
3020 | |
---|
3021 | function test_item_body_onfocus_1 () { |
---|
3022 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onfocus.xml'); |
---|
3023 | try { |
---|
3024 | $feed = new XML_Feed_Parser($content); |
---|
3025 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3026 | $this->assertTrue(false); |
---|
3027 | return; |
---|
3028 | } |
---|
3029 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3030 | } |
---|
3031 | |
---|
3032 | function test_item_body_onkeydown_1 () { |
---|
3033 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeydown.xml'); |
---|
3034 | try { |
---|
3035 | $feed = new XML_Feed_Parser($content); |
---|
3036 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3037 | $this->assertTrue(false); |
---|
3038 | return; |
---|
3039 | } |
---|
3040 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3041 | } |
---|
3042 | |
---|
3043 | function test_item_body_onkeypress_1 () { |
---|
3044 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeypress.xml'); |
---|
3045 | try { |
---|
3046 | $feed = new XML_Feed_Parser($content); |
---|
3047 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3048 | $this->assertTrue(false); |
---|
3049 | return; |
---|
3050 | } |
---|
3051 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3052 | } |
---|
3053 | |
---|
3054 | function test_item_body_onkeyup_1 () { |
---|
3055 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onkeyup.xml'); |
---|
3056 | try { |
---|
3057 | $feed = new XML_Feed_Parser($content); |
---|
3058 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3059 | $this->assertTrue(false); |
---|
3060 | return; |
---|
3061 | } |
---|
3062 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3063 | } |
---|
3064 | |
---|
3065 | function test_item_body_onload_1 () { |
---|
3066 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onload.xml'); |
---|
3067 | try { |
---|
3068 | $feed = new XML_Feed_Parser($content); |
---|
3069 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3070 | $this->assertTrue(false); |
---|
3071 | return; |
---|
3072 | } |
---|
3073 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3074 | } |
---|
3075 | |
---|
3076 | function test_item_body_onmousedown_1 () { |
---|
3077 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmousedown.xml'); |
---|
3078 | try { |
---|
3079 | $feed = new XML_Feed_Parser($content); |
---|
3080 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3081 | $this->assertTrue(false); |
---|
3082 | return; |
---|
3083 | } |
---|
3084 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3085 | } |
---|
3086 | |
---|
3087 | function test_item_body_onmouseout_1 () { |
---|
3088 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseout.xml'); |
---|
3089 | try { |
---|
3090 | $feed = new XML_Feed_Parser($content); |
---|
3091 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3092 | $this->assertTrue(false); |
---|
3093 | return; |
---|
3094 | } |
---|
3095 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3096 | } |
---|
3097 | |
---|
3098 | function test_item_body_onmouseover_1 () { |
---|
3099 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseover.xml'); |
---|
3100 | try { |
---|
3101 | $feed = new XML_Feed_Parser($content); |
---|
3102 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3103 | $this->assertTrue(false); |
---|
3104 | return; |
---|
3105 | } |
---|
3106 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3107 | } |
---|
3108 | |
---|
3109 | function test_item_body_onmouseup_1 () { |
---|
3110 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onmouseup.xml'); |
---|
3111 | try { |
---|
3112 | $feed = new XML_Feed_Parser($content); |
---|
3113 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3114 | $this->assertTrue(false); |
---|
3115 | return; |
---|
3116 | } |
---|
3117 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3118 | } |
---|
3119 | |
---|
3120 | function test_item_body_onreset_1 () { |
---|
3121 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onreset.xml'); |
---|
3122 | try { |
---|
3123 | $feed = new XML_Feed_Parser($content); |
---|
3124 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3125 | $this->assertTrue(false); |
---|
3126 | return; |
---|
3127 | } |
---|
3128 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3129 | } |
---|
3130 | |
---|
3131 | function test_item_body_onresize_1 () { |
---|
3132 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onresize.xml'); |
---|
3133 | try { |
---|
3134 | $feed = new XML_Feed_Parser($content); |
---|
3135 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3136 | $this->assertTrue(false); |
---|
3137 | return; |
---|
3138 | } |
---|
3139 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3140 | } |
---|
3141 | |
---|
3142 | function test_item_body_onsubmit_1 () { |
---|
3143 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onsubmit.xml'); |
---|
3144 | try { |
---|
3145 | $feed = new XML_Feed_Parser($content); |
---|
3146 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3147 | $this->assertTrue(false); |
---|
3148 | return; |
---|
3149 | } |
---|
3150 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3151 | } |
---|
3152 | |
---|
3153 | function test_item_body_onunload_1 () { |
---|
3154 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_onunload.xml'); |
---|
3155 | try { |
---|
3156 | $feed = new XML_Feed_Parser($content); |
---|
3157 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3158 | $this->assertTrue(false); |
---|
3159 | return; |
---|
3160 | } |
---|
3161 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3162 | } |
---|
3163 | |
---|
3164 | function test_item_body_script_1 () { |
---|
3165 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_script.xml'); |
---|
3166 | try { |
---|
3167 | $feed = new XML_Feed_Parser($content); |
---|
3168 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3169 | $this->assertTrue(false); |
---|
3170 | return; |
---|
3171 | } |
---|
3172 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3173 | } |
---|
3174 | |
---|
3175 | function test_item_body_script_map_content_1 () { |
---|
3176 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_script_map_content.xml'); |
---|
3177 | try { |
---|
3178 | $feed = new XML_Feed_Parser($content); |
---|
3179 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3180 | $this->assertTrue(false); |
---|
3181 | return; |
---|
3182 | } |
---|
3183 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
3184 | } |
---|
3185 | |
---|
3186 | function test_item_body_style_1 () { |
---|
3187 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_body_style.xml'); |
---|
3188 | try { |
---|
3189 | $feed = new XML_Feed_Parser($content); |
---|
3190 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3191 | $this->assertTrue(false); |
---|
3192 | return; |
---|
3193 | } |
---|
3194 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description); |
---|
3195 | } |
---|
3196 | |
---|
3197 | function test_item_content_encoded_applet_1 () { |
---|
3198 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_applet.xml'); |
---|
3199 | try { |
---|
3200 | $feed = new XML_Feed_Parser($content); |
---|
3201 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3202 | $this->assertTrue(false); |
---|
3203 | return; |
---|
3204 | } |
---|
3205 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3206 | } |
---|
3207 | |
---|
3208 | function test_item_content_encoded_blink_1 () { |
---|
3209 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_blink.xml'); |
---|
3210 | try { |
---|
3211 | $feed = new XML_Feed_Parser($content); |
---|
3212 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3213 | $this->assertTrue(false); |
---|
3214 | return; |
---|
3215 | } |
---|
3216 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3217 | } |
---|
3218 | |
---|
3219 | function test_item_content_encoded_crazy_1 () { |
---|
3220 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_crazy.xml'); |
---|
3221 | try { |
---|
3222 | $feed = new XML_Feed_Parser($content); |
---|
3223 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3224 | $this->assertTrue(false); |
---|
3225 | return; |
---|
3226 | } |
---|
3227 | $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); |
---|
3228 | } |
---|
3229 | |
---|
3230 | function test_item_content_encoded_embed_1 () { |
---|
3231 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_embed.xml'); |
---|
3232 | try { |
---|
3233 | $feed = new XML_Feed_Parser($content); |
---|
3234 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3235 | $this->assertTrue(false); |
---|
3236 | return; |
---|
3237 | } |
---|
3238 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3239 | } |
---|
3240 | |
---|
3241 | function test_item_content_encoded_frame_1 () { |
---|
3242 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_frame.xml'); |
---|
3243 | try { |
---|
3244 | $feed = new XML_Feed_Parser($content); |
---|
3245 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3246 | $this->assertTrue(false); |
---|
3247 | return; |
---|
3248 | } |
---|
3249 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3250 | } |
---|
3251 | |
---|
3252 | function test_item_content_encoded_iframe_1 () { |
---|
3253 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_iframe.xml'); |
---|
3254 | try { |
---|
3255 | $feed = new XML_Feed_Parser($content); |
---|
3256 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3257 | $this->assertTrue(false); |
---|
3258 | return; |
---|
3259 | } |
---|
3260 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3261 | } |
---|
3262 | |
---|
3263 | function test_item_content_encoded_link_1 () { |
---|
3264 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_link.xml'); |
---|
3265 | try { |
---|
3266 | $feed = new XML_Feed_Parser($content); |
---|
3267 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3268 | $this->assertTrue(false); |
---|
3269 | return; |
---|
3270 | } |
---|
3271 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3272 | } |
---|
3273 | |
---|
3274 | function test_item_content_encoded_map_content_1 () { |
---|
3275 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_map_content.xml'); |
---|
3276 | try { |
---|
3277 | $feed = new XML_Feed_Parser($content); |
---|
3278 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3279 | $this->assertTrue(false); |
---|
3280 | return; |
---|
3281 | } |
---|
3282 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
3283 | } |
---|
3284 | |
---|
3285 | function test_item_content_encoded_meta_1 () { |
---|
3286 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_meta.xml'); |
---|
3287 | try { |
---|
3288 | $feed = new XML_Feed_Parser($content); |
---|
3289 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3290 | $this->assertTrue(false); |
---|
3291 | return; |
---|
3292 | } |
---|
3293 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3294 | } |
---|
3295 | |
---|
3296 | function test_item_content_encoded_object_1 () { |
---|
3297 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_object.xml'); |
---|
3298 | try { |
---|
3299 | $feed = new XML_Feed_Parser($content); |
---|
3300 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3301 | $this->assertTrue(false); |
---|
3302 | return; |
---|
3303 | } |
---|
3304 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3305 | } |
---|
3306 | |
---|
3307 | function test_item_content_encoded_onabort_1 () { |
---|
3308 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onabort.xml'); |
---|
3309 | try { |
---|
3310 | $feed = new XML_Feed_Parser($content); |
---|
3311 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3312 | $this->assertTrue(false); |
---|
3313 | return; |
---|
3314 | } |
---|
3315 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3316 | } |
---|
3317 | |
---|
3318 | function test_item_content_encoded_onblur_1 () { |
---|
3319 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onblur.xml'); |
---|
3320 | try { |
---|
3321 | $feed = new XML_Feed_Parser($content); |
---|
3322 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3323 | $this->assertTrue(false); |
---|
3324 | return; |
---|
3325 | } |
---|
3326 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3327 | } |
---|
3328 | |
---|
3329 | function test_item_content_encoded_onchange_1 () { |
---|
3330 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onchange.xml'); |
---|
3331 | try { |
---|
3332 | $feed = new XML_Feed_Parser($content); |
---|
3333 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3334 | $this->assertTrue(false); |
---|
3335 | return; |
---|
3336 | } |
---|
3337 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3338 | } |
---|
3339 | |
---|
3340 | function test_item_content_encoded_onclick_1 () { |
---|
3341 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onclick.xml'); |
---|
3342 | try { |
---|
3343 | $feed = new XML_Feed_Parser($content); |
---|
3344 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3345 | $this->assertTrue(false); |
---|
3346 | return; |
---|
3347 | } |
---|
3348 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3349 | } |
---|
3350 | |
---|
3351 | function test_item_content_encoded_ondblclick_1 () { |
---|
3352 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_ondblclick.xml'); |
---|
3353 | try { |
---|
3354 | $feed = new XML_Feed_Parser($content); |
---|
3355 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3356 | $this->assertTrue(false); |
---|
3357 | return; |
---|
3358 | } |
---|
3359 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3360 | } |
---|
3361 | |
---|
3362 | function test_item_content_encoded_onerror_1 () { |
---|
3363 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onerror.xml'); |
---|
3364 | try { |
---|
3365 | $feed = new XML_Feed_Parser($content); |
---|
3366 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3367 | $this->assertTrue(false); |
---|
3368 | return; |
---|
3369 | } |
---|
3370 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3371 | } |
---|
3372 | |
---|
3373 | function test_item_content_encoded_onfocus_1 () { |
---|
3374 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onfocus.xml'); |
---|
3375 | try { |
---|
3376 | $feed = new XML_Feed_Parser($content); |
---|
3377 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3378 | $this->assertTrue(false); |
---|
3379 | return; |
---|
3380 | } |
---|
3381 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3382 | } |
---|
3383 | |
---|
3384 | function test_item_content_encoded_onkeydown_1 () { |
---|
3385 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeydown.xml'); |
---|
3386 | try { |
---|
3387 | $feed = new XML_Feed_Parser($content); |
---|
3388 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3389 | $this->assertTrue(false); |
---|
3390 | return; |
---|
3391 | } |
---|
3392 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3393 | } |
---|
3394 | |
---|
3395 | function test_item_content_encoded_onkeypress_1 () { |
---|
3396 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeypress.xml'); |
---|
3397 | try { |
---|
3398 | $feed = new XML_Feed_Parser($content); |
---|
3399 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3400 | $this->assertTrue(false); |
---|
3401 | return; |
---|
3402 | } |
---|
3403 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3404 | } |
---|
3405 | |
---|
3406 | function test_item_content_encoded_onkeyup_1 () { |
---|
3407 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onkeyup.xml'); |
---|
3408 | try { |
---|
3409 | $feed = new XML_Feed_Parser($content); |
---|
3410 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3411 | $this->assertTrue(false); |
---|
3412 | return; |
---|
3413 | } |
---|
3414 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3415 | } |
---|
3416 | |
---|
3417 | function test_item_content_encoded_onload_1 () { |
---|
3418 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onload.xml'); |
---|
3419 | try { |
---|
3420 | $feed = new XML_Feed_Parser($content); |
---|
3421 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3422 | $this->assertTrue(false); |
---|
3423 | return; |
---|
3424 | } |
---|
3425 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3426 | } |
---|
3427 | |
---|
3428 | function test_item_content_encoded_onmousedown_1 () { |
---|
3429 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmousedown.xml'); |
---|
3430 | try { |
---|
3431 | $feed = new XML_Feed_Parser($content); |
---|
3432 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3433 | $this->assertTrue(false); |
---|
3434 | return; |
---|
3435 | } |
---|
3436 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3437 | } |
---|
3438 | |
---|
3439 | function test_item_content_encoded_onmouseout_1 () { |
---|
3440 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseout.xml'); |
---|
3441 | try { |
---|
3442 | $feed = new XML_Feed_Parser($content); |
---|
3443 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3444 | $this->assertTrue(false); |
---|
3445 | return; |
---|
3446 | } |
---|
3447 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3448 | } |
---|
3449 | |
---|
3450 | function test_item_content_encoded_onmouseover_1 () { |
---|
3451 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseover.xml'); |
---|
3452 | try { |
---|
3453 | $feed = new XML_Feed_Parser($content); |
---|
3454 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3455 | $this->assertTrue(false); |
---|
3456 | return; |
---|
3457 | } |
---|
3458 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3459 | } |
---|
3460 | |
---|
3461 | function test_item_content_encoded_onmouseup_1 () { |
---|
3462 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onmouseup.xml'); |
---|
3463 | try { |
---|
3464 | $feed = new XML_Feed_Parser($content); |
---|
3465 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3466 | $this->assertTrue(false); |
---|
3467 | return; |
---|
3468 | } |
---|
3469 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3470 | } |
---|
3471 | |
---|
3472 | function test_item_content_encoded_onreset_1 () { |
---|
3473 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onreset.xml'); |
---|
3474 | try { |
---|
3475 | $feed = new XML_Feed_Parser($content); |
---|
3476 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3477 | $this->assertTrue(false); |
---|
3478 | return; |
---|
3479 | } |
---|
3480 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3481 | } |
---|
3482 | |
---|
3483 | function test_item_content_encoded_onresize_1 () { |
---|
3484 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onresize.xml'); |
---|
3485 | try { |
---|
3486 | $feed = new XML_Feed_Parser($content); |
---|
3487 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3488 | $this->assertTrue(false); |
---|
3489 | return; |
---|
3490 | } |
---|
3491 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3492 | } |
---|
3493 | |
---|
3494 | function test_item_content_encoded_onsubmit_1 () { |
---|
3495 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onsubmit.xml'); |
---|
3496 | try { |
---|
3497 | $feed = new XML_Feed_Parser($content); |
---|
3498 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3499 | $this->assertTrue(false); |
---|
3500 | return; |
---|
3501 | } |
---|
3502 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3503 | } |
---|
3504 | |
---|
3505 | function test_item_content_encoded_onunload_1 () { |
---|
3506 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_onunload.xml'); |
---|
3507 | try { |
---|
3508 | $feed = new XML_Feed_Parser($content); |
---|
3509 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3510 | $this->assertTrue(false); |
---|
3511 | return; |
---|
3512 | } |
---|
3513 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3514 | } |
---|
3515 | |
---|
3516 | function test_item_content_encoded_script_1 () { |
---|
3517 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script.xml'); |
---|
3518 | try { |
---|
3519 | $feed = new XML_Feed_Parser($content); |
---|
3520 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3521 | $this->assertTrue(false); |
---|
3522 | return; |
---|
3523 | } |
---|
3524 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3525 | } |
---|
3526 | |
---|
3527 | function test_item_content_encoded_script_cdata_1 () { |
---|
3528 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script_cdata.xml'); |
---|
3529 | try { |
---|
3530 | $feed = new XML_Feed_Parser($content); |
---|
3531 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3532 | $this->assertTrue(false); |
---|
3533 | return; |
---|
3534 | } |
---|
3535 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3536 | } |
---|
3537 | |
---|
3538 | function test_item_content_encoded_script_map_content_1 () { |
---|
3539 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_script_map_content.xml'); |
---|
3540 | try { |
---|
3541 | $feed = new XML_Feed_Parser($content); |
---|
3542 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3543 | $this->assertTrue(false); |
---|
3544 | return; |
---|
3545 | } |
---|
3546 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
3547 | } |
---|
3548 | |
---|
3549 | function test_item_content_encoded_style_1 () { |
---|
3550 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_content_encoded_style.xml'); |
---|
3551 | try { |
---|
3552 | $feed = new XML_Feed_Parser($content); |
---|
3553 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3554 | $this->assertTrue(false); |
---|
3555 | return; |
---|
3556 | } |
---|
3557 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description); |
---|
3558 | } |
---|
3559 | |
---|
3560 | function test_item_description_applet_1 () { |
---|
3561 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_applet.xml'); |
---|
3562 | try { |
---|
3563 | $feed = new XML_Feed_Parser($content); |
---|
3564 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3565 | $this->assertTrue(false); |
---|
3566 | return; |
---|
3567 | } |
---|
3568 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3569 | } |
---|
3570 | |
---|
3571 | function test_item_description_blink_1 () { |
---|
3572 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_blink.xml'); |
---|
3573 | try { |
---|
3574 | $feed = new XML_Feed_Parser($content); |
---|
3575 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3576 | $this->assertTrue(false); |
---|
3577 | return; |
---|
3578 | } |
---|
3579 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3580 | } |
---|
3581 | |
---|
3582 | function test_item_description_crazy_1 () { |
---|
3583 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_crazy.xml'); |
---|
3584 | try { |
---|
3585 | $feed = new XML_Feed_Parser($content); |
---|
3586 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3587 | $this->assertTrue(false); |
---|
3588 | return; |
---|
3589 | } |
---|
3590 | $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); |
---|
3591 | } |
---|
3592 | |
---|
3593 | function test_item_description_embed_1 () { |
---|
3594 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_embed.xml'); |
---|
3595 | try { |
---|
3596 | $feed = new XML_Feed_Parser($content); |
---|
3597 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3598 | $this->assertTrue(false); |
---|
3599 | return; |
---|
3600 | } |
---|
3601 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3602 | } |
---|
3603 | |
---|
3604 | function test_item_description_frame_1 () { |
---|
3605 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_frame.xml'); |
---|
3606 | try { |
---|
3607 | $feed = new XML_Feed_Parser($content); |
---|
3608 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3609 | $this->assertTrue(false); |
---|
3610 | return; |
---|
3611 | } |
---|
3612 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3613 | } |
---|
3614 | |
---|
3615 | function test_item_description_iframe_1 () { |
---|
3616 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_iframe.xml'); |
---|
3617 | try { |
---|
3618 | $feed = new XML_Feed_Parser($content); |
---|
3619 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3620 | $this->assertTrue(false); |
---|
3621 | return; |
---|
3622 | } |
---|
3623 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3624 | } |
---|
3625 | |
---|
3626 | function test_item_description_link_1 () { |
---|
3627 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_link.xml'); |
---|
3628 | try { |
---|
3629 | $feed = new XML_Feed_Parser($content); |
---|
3630 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3631 | $this->assertTrue(false); |
---|
3632 | return; |
---|
3633 | } |
---|
3634 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3635 | } |
---|
3636 | |
---|
3637 | function test_item_description_meta_1 () { |
---|
3638 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_meta.xml'); |
---|
3639 | try { |
---|
3640 | $feed = new XML_Feed_Parser($content); |
---|
3641 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3642 | $this->assertTrue(false); |
---|
3643 | return; |
---|
3644 | } |
---|
3645 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3646 | } |
---|
3647 | |
---|
3648 | function test_item_description_object_1 () { |
---|
3649 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_object.xml'); |
---|
3650 | try { |
---|
3651 | $feed = new XML_Feed_Parser($content); |
---|
3652 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3653 | $this->assertTrue(false); |
---|
3654 | return; |
---|
3655 | } |
---|
3656 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3657 | } |
---|
3658 | |
---|
3659 | function test_item_description_onabort_1 () { |
---|
3660 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onabort.xml'); |
---|
3661 | try { |
---|
3662 | $feed = new XML_Feed_Parser($content); |
---|
3663 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3664 | $this->assertTrue(false); |
---|
3665 | return; |
---|
3666 | } |
---|
3667 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3668 | } |
---|
3669 | |
---|
3670 | function test_item_description_onblur_1 () { |
---|
3671 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onblur.xml'); |
---|
3672 | try { |
---|
3673 | $feed = new XML_Feed_Parser($content); |
---|
3674 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3675 | $this->assertTrue(false); |
---|
3676 | return; |
---|
3677 | } |
---|
3678 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3679 | } |
---|
3680 | |
---|
3681 | function test_item_description_onchange_1 () { |
---|
3682 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onchange.xml'); |
---|
3683 | try { |
---|
3684 | $feed = new XML_Feed_Parser($content); |
---|
3685 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3686 | $this->assertTrue(false); |
---|
3687 | return; |
---|
3688 | } |
---|
3689 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3690 | } |
---|
3691 | |
---|
3692 | function test_item_description_onclick_1 () { |
---|
3693 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onclick.xml'); |
---|
3694 | try { |
---|
3695 | $feed = new XML_Feed_Parser($content); |
---|
3696 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3697 | $this->assertTrue(false); |
---|
3698 | return; |
---|
3699 | } |
---|
3700 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3701 | } |
---|
3702 | |
---|
3703 | function test_item_description_ondblclick_1 () { |
---|
3704 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_ondblclick.xml'); |
---|
3705 | try { |
---|
3706 | $feed = new XML_Feed_Parser($content); |
---|
3707 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3708 | $this->assertTrue(false); |
---|
3709 | return; |
---|
3710 | } |
---|
3711 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3712 | } |
---|
3713 | |
---|
3714 | function test_item_description_onerror_1 () { |
---|
3715 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onerror.xml'); |
---|
3716 | try { |
---|
3717 | $feed = new XML_Feed_Parser($content); |
---|
3718 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3719 | $this->assertTrue(false); |
---|
3720 | return; |
---|
3721 | } |
---|
3722 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3723 | } |
---|
3724 | |
---|
3725 | function test_item_description_onfocus_1 () { |
---|
3726 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onfocus.xml'); |
---|
3727 | try { |
---|
3728 | $feed = new XML_Feed_Parser($content); |
---|
3729 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3730 | $this->assertTrue(false); |
---|
3731 | return; |
---|
3732 | } |
---|
3733 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3734 | } |
---|
3735 | |
---|
3736 | function test_item_description_onkeydown_1 () { |
---|
3737 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeydown.xml'); |
---|
3738 | try { |
---|
3739 | $feed = new XML_Feed_Parser($content); |
---|
3740 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3741 | $this->assertTrue(false); |
---|
3742 | return; |
---|
3743 | } |
---|
3744 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3745 | } |
---|
3746 | |
---|
3747 | function test_item_description_onkeypress_1 () { |
---|
3748 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeypress.xml'); |
---|
3749 | try { |
---|
3750 | $feed = new XML_Feed_Parser($content); |
---|
3751 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3752 | $this->assertTrue(false); |
---|
3753 | return; |
---|
3754 | } |
---|
3755 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3756 | } |
---|
3757 | |
---|
3758 | function test_item_description_onkeyup_1 () { |
---|
3759 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onkeyup.xml'); |
---|
3760 | try { |
---|
3761 | $feed = new XML_Feed_Parser($content); |
---|
3762 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3763 | $this->assertTrue(false); |
---|
3764 | return; |
---|
3765 | } |
---|
3766 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3767 | } |
---|
3768 | |
---|
3769 | function test_item_description_onload_1 () { |
---|
3770 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onload.xml'); |
---|
3771 | try { |
---|
3772 | $feed = new XML_Feed_Parser($content); |
---|
3773 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3774 | $this->assertTrue(false); |
---|
3775 | return; |
---|
3776 | } |
---|
3777 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3778 | } |
---|
3779 | |
---|
3780 | function test_item_description_onmousedown_1 () { |
---|
3781 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmousedown.xml'); |
---|
3782 | try { |
---|
3783 | $feed = new XML_Feed_Parser($content); |
---|
3784 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3785 | $this->assertTrue(false); |
---|
3786 | return; |
---|
3787 | } |
---|
3788 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3789 | } |
---|
3790 | |
---|
3791 | function test_item_description_onmouseout_1 () { |
---|
3792 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseout.xml'); |
---|
3793 | try { |
---|
3794 | $feed = new XML_Feed_Parser($content); |
---|
3795 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3796 | $this->assertTrue(false); |
---|
3797 | return; |
---|
3798 | } |
---|
3799 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3800 | } |
---|
3801 | |
---|
3802 | function test_item_description_onmouseover_1 () { |
---|
3803 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseover.xml'); |
---|
3804 | try { |
---|
3805 | $feed = new XML_Feed_Parser($content); |
---|
3806 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3807 | $this->assertTrue(false); |
---|
3808 | return; |
---|
3809 | } |
---|
3810 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3811 | } |
---|
3812 | |
---|
3813 | function test_item_description_onmouseup_1 () { |
---|
3814 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onmouseup.xml'); |
---|
3815 | try { |
---|
3816 | $feed = new XML_Feed_Parser($content); |
---|
3817 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3818 | $this->assertTrue(false); |
---|
3819 | return; |
---|
3820 | } |
---|
3821 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3822 | } |
---|
3823 | |
---|
3824 | function test_item_description_onreset_1 () { |
---|
3825 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onreset.xml'); |
---|
3826 | try { |
---|
3827 | $feed = new XML_Feed_Parser($content); |
---|
3828 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3829 | $this->assertTrue(false); |
---|
3830 | return; |
---|
3831 | } |
---|
3832 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3833 | } |
---|
3834 | |
---|
3835 | function test_item_description_onresize_1 () { |
---|
3836 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onresize.xml'); |
---|
3837 | try { |
---|
3838 | $feed = new XML_Feed_Parser($content); |
---|
3839 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3840 | $this->assertTrue(false); |
---|
3841 | return; |
---|
3842 | } |
---|
3843 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3844 | } |
---|
3845 | |
---|
3846 | function test_item_description_onsubmit_1 () { |
---|
3847 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onsubmit.xml'); |
---|
3848 | try { |
---|
3849 | $feed = new XML_Feed_Parser($content); |
---|
3850 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3851 | $this->assertTrue(false); |
---|
3852 | return; |
---|
3853 | } |
---|
3854 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3855 | } |
---|
3856 | |
---|
3857 | function test_item_description_onunload_1 () { |
---|
3858 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_onunload.xml'); |
---|
3859 | try { |
---|
3860 | $feed = new XML_Feed_Parser($content); |
---|
3861 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3862 | $this->assertTrue(false); |
---|
3863 | return; |
---|
3864 | } |
---|
3865 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
3866 | } |
---|
3867 | |
---|
3868 | function test_item_description_script_1 () { |
---|
3869 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script.xml'); |
---|
3870 | try { |
---|
3871 | $feed = new XML_Feed_Parser($content); |
---|
3872 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3873 | $this->assertTrue(false); |
---|
3874 | return; |
---|
3875 | } |
---|
3876 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3877 | } |
---|
3878 | |
---|
3879 | function test_item_description_script_cdata_1 () { |
---|
3880 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script_cdata.xml'); |
---|
3881 | try { |
---|
3882 | $feed = new XML_Feed_Parser($content); |
---|
3883 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3884 | $this->assertTrue(false); |
---|
3885 | return; |
---|
3886 | } |
---|
3887 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3888 | } |
---|
3889 | |
---|
3890 | function test_item_description_script_map_summary_1 () { |
---|
3891 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_script_map_summary.xml'); |
---|
3892 | try { |
---|
3893 | $feed = new XML_Feed_Parser($content); |
---|
3894 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3895 | $this->assertTrue(false); |
---|
3896 | return; |
---|
3897 | } |
---|
3898 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->summary); |
---|
3899 | } |
---|
3900 | |
---|
3901 | function test_item_description_style_1 () { |
---|
3902 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_description_style.xml'); |
---|
3903 | try { |
---|
3904 | $feed = new XML_Feed_Parser($content); |
---|
3905 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3906 | $this->assertTrue(false); |
---|
3907 | return; |
---|
3908 | } |
---|
3909 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description); |
---|
3910 | } |
---|
3911 | |
---|
3912 | function test_item_fullitem_applet_1 () { |
---|
3913 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_applet.xml'); |
---|
3914 | try { |
---|
3915 | $feed = new XML_Feed_Parser($content); |
---|
3916 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3917 | $this->assertTrue(false); |
---|
3918 | return; |
---|
3919 | } |
---|
3920 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3921 | } |
---|
3922 | |
---|
3923 | function test_item_fullitem_blink_1 () { |
---|
3924 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_blink.xml'); |
---|
3925 | try { |
---|
3926 | $feed = new XML_Feed_Parser($content); |
---|
3927 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3928 | $this->assertTrue(false); |
---|
3929 | return; |
---|
3930 | } |
---|
3931 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3932 | } |
---|
3933 | |
---|
3934 | function test_item_fullitem_crazy_1 () { |
---|
3935 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_crazy.xml'); |
---|
3936 | try { |
---|
3937 | $feed = new XML_Feed_Parser($content); |
---|
3938 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3939 | $this->assertTrue(false); |
---|
3940 | return; |
---|
3941 | } |
---|
3942 | $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); |
---|
3943 | } |
---|
3944 | |
---|
3945 | function test_item_fullitem_embed_1 () { |
---|
3946 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_embed.xml'); |
---|
3947 | try { |
---|
3948 | $feed = new XML_Feed_Parser($content); |
---|
3949 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3950 | $this->assertTrue(false); |
---|
3951 | return; |
---|
3952 | } |
---|
3953 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3954 | } |
---|
3955 | |
---|
3956 | function test_item_fullitem_frame_1 () { |
---|
3957 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_frame.xml'); |
---|
3958 | try { |
---|
3959 | $feed = new XML_Feed_Parser($content); |
---|
3960 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3961 | $this->assertTrue(false); |
---|
3962 | return; |
---|
3963 | } |
---|
3964 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3965 | } |
---|
3966 | |
---|
3967 | function test_item_fullitem_iframe_1 () { |
---|
3968 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_iframe.xml'); |
---|
3969 | try { |
---|
3970 | $feed = new XML_Feed_Parser($content); |
---|
3971 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3972 | $this->assertTrue(false); |
---|
3973 | return; |
---|
3974 | } |
---|
3975 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3976 | } |
---|
3977 | |
---|
3978 | function test_item_fullitem_link_1 () { |
---|
3979 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_link.xml'); |
---|
3980 | try { |
---|
3981 | $feed = new XML_Feed_Parser($content); |
---|
3982 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3983 | $this->assertTrue(false); |
---|
3984 | return; |
---|
3985 | } |
---|
3986 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3987 | } |
---|
3988 | |
---|
3989 | function test_item_fullitem_meta_1 () { |
---|
3990 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_meta.xml'); |
---|
3991 | try { |
---|
3992 | $feed = new XML_Feed_Parser($content); |
---|
3993 | } catch (XML_Feed_Parser_Exception $e) { |
---|
3994 | $this->assertTrue(false); |
---|
3995 | return; |
---|
3996 | } |
---|
3997 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
3998 | } |
---|
3999 | |
---|
4000 | function test_item_fullitem_object_1 () { |
---|
4001 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_object.xml'); |
---|
4002 | try { |
---|
4003 | $feed = new XML_Feed_Parser($content); |
---|
4004 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4005 | $this->assertTrue(false); |
---|
4006 | return; |
---|
4007 | } |
---|
4008 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4009 | } |
---|
4010 | |
---|
4011 | function test_item_fullitem_onabort_1 () { |
---|
4012 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onabort.xml'); |
---|
4013 | try { |
---|
4014 | $feed = new XML_Feed_Parser($content); |
---|
4015 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4016 | $this->assertTrue(false); |
---|
4017 | return; |
---|
4018 | } |
---|
4019 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4020 | } |
---|
4021 | |
---|
4022 | function test_item_fullitem_onblur_1 () { |
---|
4023 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onblur.xml'); |
---|
4024 | try { |
---|
4025 | $feed = new XML_Feed_Parser($content); |
---|
4026 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4027 | $this->assertTrue(false); |
---|
4028 | return; |
---|
4029 | } |
---|
4030 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4031 | } |
---|
4032 | |
---|
4033 | function test_item_fullitem_onchange_1 () { |
---|
4034 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onchange.xml'); |
---|
4035 | try { |
---|
4036 | $feed = new XML_Feed_Parser($content); |
---|
4037 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4038 | $this->assertTrue(false); |
---|
4039 | return; |
---|
4040 | } |
---|
4041 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4042 | } |
---|
4043 | |
---|
4044 | function test_item_fullitem_onclick_1 () { |
---|
4045 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onclick.xml'); |
---|
4046 | try { |
---|
4047 | $feed = new XML_Feed_Parser($content); |
---|
4048 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4049 | $this->assertTrue(false); |
---|
4050 | return; |
---|
4051 | } |
---|
4052 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4053 | } |
---|
4054 | |
---|
4055 | function test_item_fullitem_ondblclick_1 () { |
---|
4056 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_ondblclick.xml'); |
---|
4057 | try { |
---|
4058 | $feed = new XML_Feed_Parser($content); |
---|
4059 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4060 | $this->assertTrue(false); |
---|
4061 | return; |
---|
4062 | } |
---|
4063 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4064 | } |
---|
4065 | |
---|
4066 | function test_item_fullitem_onerror_1 () { |
---|
4067 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onerror.xml'); |
---|
4068 | try { |
---|
4069 | $feed = new XML_Feed_Parser($content); |
---|
4070 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4071 | $this->assertTrue(false); |
---|
4072 | return; |
---|
4073 | } |
---|
4074 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4075 | } |
---|
4076 | |
---|
4077 | function test_item_fullitem_onfocus_1 () { |
---|
4078 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onfocus.xml'); |
---|
4079 | try { |
---|
4080 | $feed = new XML_Feed_Parser($content); |
---|
4081 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4082 | $this->assertTrue(false); |
---|
4083 | return; |
---|
4084 | } |
---|
4085 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4086 | } |
---|
4087 | |
---|
4088 | function test_item_fullitem_onkeydown_1 () { |
---|
4089 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeydown.xml'); |
---|
4090 | try { |
---|
4091 | $feed = new XML_Feed_Parser($content); |
---|
4092 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4093 | $this->assertTrue(false); |
---|
4094 | return; |
---|
4095 | } |
---|
4096 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4097 | } |
---|
4098 | |
---|
4099 | function test_item_fullitem_onkeypress_1 () { |
---|
4100 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeypress.xml'); |
---|
4101 | try { |
---|
4102 | $feed = new XML_Feed_Parser($content); |
---|
4103 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4104 | $this->assertTrue(false); |
---|
4105 | return; |
---|
4106 | } |
---|
4107 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4108 | } |
---|
4109 | |
---|
4110 | function test_item_fullitem_onkeyup_1 () { |
---|
4111 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onkeyup.xml'); |
---|
4112 | try { |
---|
4113 | $feed = new XML_Feed_Parser($content); |
---|
4114 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4115 | $this->assertTrue(false); |
---|
4116 | return; |
---|
4117 | } |
---|
4118 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4119 | } |
---|
4120 | |
---|
4121 | function test_item_fullitem_onload_1 () { |
---|
4122 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onload.xml'); |
---|
4123 | try { |
---|
4124 | $feed = new XML_Feed_Parser($content); |
---|
4125 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4126 | $this->assertTrue(false); |
---|
4127 | return; |
---|
4128 | } |
---|
4129 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4130 | } |
---|
4131 | |
---|
4132 | function test_item_fullitem_onmousedown_1 () { |
---|
4133 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmousedown.xml'); |
---|
4134 | try { |
---|
4135 | $feed = new XML_Feed_Parser($content); |
---|
4136 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4137 | $this->assertTrue(false); |
---|
4138 | return; |
---|
4139 | } |
---|
4140 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4141 | } |
---|
4142 | |
---|
4143 | function test_item_fullitem_onmouseout_1 () { |
---|
4144 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseout.xml'); |
---|
4145 | try { |
---|
4146 | $feed = new XML_Feed_Parser($content); |
---|
4147 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4148 | $this->assertTrue(false); |
---|
4149 | return; |
---|
4150 | } |
---|
4151 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4152 | } |
---|
4153 | |
---|
4154 | function test_item_fullitem_onmouseover_1 () { |
---|
4155 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseover.xml'); |
---|
4156 | try { |
---|
4157 | $feed = new XML_Feed_Parser($content); |
---|
4158 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4159 | $this->assertTrue(false); |
---|
4160 | return; |
---|
4161 | } |
---|
4162 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4163 | } |
---|
4164 | |
---|
4165 | function test_item_fullitem_onmouseup_1 () { |
---|
4166 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onmouseup.xml'); |
---|
4167 | try { |
---|
4168 | $feed = new XML_Feed_Parser($content); |
---|
4169 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4170 | $this->assertTrue(false); |
---|
4171 | return; |
---|
4172 | } |
---|
4173 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4174 | } |
---|
4175 | |
---|
4176 | function test_item_fullitem_onreset_1 () { |
---|
4177 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onreset.xml'); |
---|
4178 | try { |
---|
4179 | $feed = new XML_Feed_Parser($content); |
---|
4180 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4181 | $this->assertTrue(false); |
---|
4182 | return; |
---|
4183 | } |
---|
4184 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4185 | } |
---|
4186 | |
---|
4187 | function test_item_fullitem_onresize_1 () { |
---|
4188 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onresize.xml'); |
---|
4189 | try { |
---|
4190 | $feed = new XML_Feed_Parser($content); |
---|
4191 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4192 | $this->assertTrue(false); |
---|
4193 | return; |
---|
4194 | } |
---|
4195 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4196 | } |
---|
4197 | |
---|
4198 | function test_item_fullitem_onsubmit_1 () { |
---|
4199 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onsubmit.xml'); |
---|
4200 | try { |
---|
4201 | $feed = new XML_Feed_Parser($content); |
---|
4202 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4203 | $this->assertTrue(false); |
---|
4204 | return; |
---|
4205 | } |
---|
4206 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4207 | } |
---|
4208 | |
---|
4209 | function test_item_fullitem_onunload_1 () { |
---|
4210 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_onunload.xml'); |
---|
4211 | try { |
---|
4212 | $feed = new XML_Feed_Parser($content); |
---|
4213 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4214 | $this->assertTrue(false); |
---|
4215 | return; |
---|
4216 | } |
---|
4217 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4218 | } |
---|
4219 | |
---|
4220 | function test_item_fullitem_script_1 () { |
---|
4221 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script.xml'); |
---|
4222 | try { |
---|
4223 | $feed = new XML_Feed_Parser($content); |
---|
4224 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4225 | $this->assertTrue(false); |
---|
4226 | return; |
---|
4227 | } |
---|
4228 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4229 | } |
---|
4230 | |
---|
4231 | function test_item_fullitem_script_cdata_1 () { |
---|
4232 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script_cdata.xml'); |
---|
4233 | try { |
---|
4234 | $feed = new XML_Feed_Parser($content); |
---|
4235 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4236 | $this->assertTrue(false); |
---|
4237 | return; |
---|
4238 | } |
---|
4239 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4240 | } |
---|
4241 | |
---|
4242 | function test_item_fullitem_script_map_summary_1 () { |
---|
4243 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_script_map_summary.xml'); |
---|
4244 | try { |
---|
4245 | $feed = new XML_Feed_Parser($content); |
---|
4246 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4247 | $this->assertTrue(false); |
---|
4248 | return; |
---|
4249 | } |
---|
4250 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
4251 | } |
---|
4252 | |
---|
4253 | function test_item_fullitem_style_1 () { |
---|
4254 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_fullitem_style.xml'); |
---|
4255 | try { |
---|
4256 | $feed = new XML_Feed_Parser($content); |
---|
4257 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4258 | $this->assertTrue(false); |
---|
4259 | return; |
---|
4260 | } |
---|
4261 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description); |
---|
4262 | } |
---|
4263 | |
---|
4264 | function test_item_xhtml_body_applet_1 () { |
---|
4265 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_applet.xml'); |
---|
4266 | try { |
---|
4267 | $feed = new XML_Feed_Parser($content); |
---|
4268 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4269 | $this->assertTrue(false); |
---|
4270 | return; |
---|
4271 | } |
---|
4272 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4273 | } |
---|
4274 | |
---|
4275 | function test_item_xhtml_body_blink_1 () { |
---|
4276 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_blink.xml'); |
---|
4277 | try { |
---|
4278 | $feed = new XML_Feed_Parser($content); |
---|
4279 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4280 | $this->assertTrue(false); |
---|
4281 | return; |
---|
4282 | } |
---|
4283 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4284 | } |
---|
4285 | |
---|
4286 | function test_item_xhtml_body_embed_1 () { |
---|
4287 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_embed.xml'); |
---|
4288 | try { |
---|
4289 | $feed = new XML_Feed_Parser($content); |
---|
4290 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4291 | $this->assertTrue(false); |
---|
4292 | return; |
---|
4293 | } |
---|
4294 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4295 | } |
---|
4296 | |
---|
4297 | function test_item_xhtml_body_frame_1 () { |
---|
4298 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_frame.xml'); |
---|
4299 | try { |
---|
4300 | $feed = new XML_Feed_Parser($content); |
---|
4301 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4302 | $this->assertTrue(false); |
---|
4303 | return; |
---|
4304 | } |
---|
4305 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4306 | } |
---|
4307 | |
---|
4308 | function test_item_xhtml_body_iframe_1 () { |
---|
4309 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_iframe.xml'); |
---|
4310 | try { |
---|
4311 | $feed = new XML_Feed_Parser($content); |
---|
4312 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4313 | $this->assertTrue(false); |
---|
4314 | return; |
---|
4315 | } |
---|
4316 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4317 | } |
---|
4318 | |
---|
4319 | function test_item_xhtml_body_link_1 () { |
---|
4320 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_link.xml'); |
---|
4321 | try { |
---|
4322 | $feed = new XML_Feed_Parser($content); |
---|
4323 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4324 | $this->assertTrue(false); |
---|
4325 | return; |
---|
4326 | } |
---|
4327 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4328 | } |
---|
4329 | |
---|
4330 | function test_item_xhtml_body_meta_1 () { |
---|
4331 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_meta.xml'); |
---|
4332 | try { |
---|
4333 | $feed = new XML_Feed_Parser($content); |
---|
4334 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4335 | $this->assertTrue(false); |
---|
4336 | return; |
---|
4337 | } |
---|
4338 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4339 | } |
---|
4340 | |
---|
4341 | function test_item_xhtml_body_object_1 () { |
---|
4342 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_object.xml'); |
---|
4343 | try { |
---|
4344 | $feed = new XML_Feed_Parser($content); |
---|
4345 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4346 | $this->assertTrue(false); |
---|
4347 | return; |
---|
4348 | } |
---|
4349 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4350 | } |
---|
4351 | |
---|
4352 | function test_item_xhtml_body_onabort_1 () { |
---|
4353 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onabort.xml'); |
---|
4354 | try { |
---|
4355 | $feed = new XML_Feed_Parser($content); |
---|
4356 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4357 | $this->assertTrue(false); |
---|
4358 | return; |
---|
4359 | } |
---|
4360 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4361 | } |
---|
4362 | |
---|
4363 | function test_item_xhtml_body_onblur_1 () { |
---|
4364 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onblur.xml'); |
---|
4365 | try { |
---|
4366 | $feed = new XML_Feed_Parser($content); |
---|
4367 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4368 | $this->assertTrue(false); |
---|
4369 | return; |
---|
4370 | } |
---|
4371 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4372 | } |
---|
4373 | |
---|
4374 | function test_item_xhtml_body_onchange_1 () { |
---|
4375 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onchange.xml'); |
---|
4376 | try { |
---|
4377 | $feed = new XML_Feed_Parser($content); |
---|
4378 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4379 | $this->assertTrue(false); |
---|
4380 | return; |
---|
4381 | } |
---|
4382 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4383 | } |
---|
4384 | |
---|
4385 | function test_item_xhtml_body_onclick_1 () { |
---|
4386 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onclick.xml'); |
---|
4387 | try { |
---|
4388 | $feed = new XML_Feed_Parser($content); |
---|
4389 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4390 | $this->assertTrue(false); |
---|
4391 | return; |
---|
4392 | } |
---|
4393 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4394 | } |
---|
4395 | |
---|
4396 | function test_item_xhtml_body_ondblclick_1 () { |
---|
4397 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_ondblclick.xml'); |
---|
4398 | try { |
---|
4399 | $feed = new XML_Feed_Parser($content); |
---|
4400 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4401 | $this->assertTrue(false); |
---|
4402 | return; |
---|
4403 | } |
---|
4404 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4405 | } |
---|
4406 | |
---|
4407 | function test_item_xhtml_body_onerror_1 () { |
---|
4408 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onerror.xml'); |
---|
4409 | try { |
---|
4410 | $feed = new XML_Feed_Parser($content); |
---|
4411 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4412 | $this->assertTrue(false); |
---|
4413 | return; |
---|
4414 | } |
---|
4415 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4416 | } |
---|
4417 | |
---|
4418 | function test_item_xhtml_body_onfocus_1 () { |
---|
4419 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onfocus.xml'); |
---|
4420 | try { |
---|
4421 | $feed = new XML_Feed_Parser($content); |
---|
4422 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4423 | $this->assertTrue(false); |
---|
4424 | return; |
---|
4425 | } |
---|
4426 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4427 | } |
---|
4428 | |
---|
4429 | function test_item_xhtml_body_onkeydown_1 () { |
---|
4430 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeydown.xml'); |
---|
4431 | try { |
---|
4432 | $feed = new XML_Feed_Parser($content); |
---|
4433 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4434 | $this->assertTrue(false); |
---|
4435 | return; |
---|
4436 | } |
---|
4437 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4438 | } |
---|
4439 | |
---|
4440 | function test_item_xhtml_body_onkeypress_1 () { |
---|
4441 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeypress.xml'); |
---|
4442 | try { |
---|
4443 | $feed = new XML_Feed_Parser($content); |
---|
4444 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4445 | $this->assertTrue(false); |
---|
4446 | return; |
---|
4447 | } |
---|
4448 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4449 | } |
---|
4450 | |
---|
4451 | function test_item_xhtml_body_onkeyup_1 () { |
---|
4452 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onkeyup.xml'); |
---|
4453 | try { |
---|
4454 | $feed = new XML_Feed_Parser($content); |
---|
4455 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4456 | $this->assertTrue(false); |
---|
4457 | return; |
---|
4458 | } |
---|
4459 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4460 | } |
---|
4461 | |
---|
4462 | function test_item_xhtml_body_onload_1 () { |
---|
4463 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onload.xml'); |
---|
4464 | try { |
---|
4465 | $feed = new XML_Feed_Parser($content); |
---|
4466 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4467 | $this->assertTrue(false); |
---|
4468 | return; |
---|
4469 | } |
---|
4470 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4471 | } |
---|
4472 | |
---|
4473 | function test_item_xhtml_body_onmousedown_1 () { |
---|
4474 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmousedown.xml'); |
---|
4475 | try { |
---|
4476 | $feed = new XML_Feed_Parser($content); |
---|
4477 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4478 | $this->assertTrue(false); |
---|
4479 | return; |
---|
4480 | } |
---|
4481 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4482 | } |
---|
4483 | |
---|
4484 | function test_item_xhtml_body_onmouseout_1 () { |
---|
4485 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseout.xml'); |
---|
4486 | try { |
---|
4487 | $feed = new XML_Feed_Parser($content); |
---|
4488 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4489 | $this->assertTrue(false); |
---|
4490 | return; |
---|
4491 | } |
---|
4492 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4493 | } |
---|
4494 | |
---|
4495 | function test_item_xhtml_body_onmouseover_1 () { |
---|
4496 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseover.xml'); |
---|
4497 | try { |
---|
4498 | $feed = new XML_Feed_Parser($content); |
---|
4499 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4500 | $this->assertTrue(false); |
---|
4501 | return; |
---|
4502 | } |
---|
4503 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4504 | } |
---|
4505 | |
---|
4506 | function test_item_xhtml_body_onmouseup_1 () { |
---|
4507 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onmouseup.xml'); |
---|
4508 | try { |
---|
4509 | $feed = new XML_Feed_Parser($content); |
---|
4510 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4511 | $this->assertTrue(false); |
---|
4512 | return; |
---|
4513 | } |
---|
4514 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4515 | } |
---|
4516 | |
---|
4517 | function test_item_xhtml_body_onreset_1 () { |
---|
4518 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onreset.xml'); |
---|
4519 | try { |
---|
4520 | $feed = new XML_Feed_Parser($content); |
---|
4521 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4522 | $this->assertTrue(false); |
---|
4523 | return; |
---|
4524 | } |
---|
4525 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4526 | } |
---|
4527 | |
---|
4528 | function test_item_xhtml_body_onresize_1 () { |
---|
4529 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onresize.xml'); |
---|
4530 | try { |
---|
4531 | $feed = new XML_Feed_Parser($content); |
---|
4532 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4533 | $this->assertTrue(false); |
---|
4534 | return; |
---|
4535 | } |
---|
4536 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4537 | } |
---|
4538 | |
---|
4539 | function test_item_xhtml_body_onsubmit_1 () { |
---|
4540 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onsubmit.xml'); |
---|
4541 | try { |
---|
4542 | $feed = new XML_Feed_Parser($content); |
---|
4543 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4544 | $this->assertTrue(false); |
---|
4545 | return; |
---|
4546 | } |
---|
4547 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4548 | } |
---|
4549 | |
---|
4550 | function test_item_xhtml_body_onunload_1 () { |
---|
4551 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_onunload.xml'); |
---|
4552 | try { |
---|
4553 | $feed = new XML_Feed_Parser($content); |
---|
4554 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4555 | $this->assertTrue(false); |
---|
4556 | return; |
---|
4557 | } |
---|
4558 | $this->assertEquals('<img src="http://www.ragingplatypus.com/i/cam-full.jpg" />', $feed->getEntryByOffset(0)->description); |
---|
4559 | } |
---|
4560 | |
---|
4561 | function test_item_xhtml_body_script_1 () { |
---|
4562 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_script.xml'); |
---|
4563 | try { |
---|
4564 | $feed = new XML_Feed_Parser($content); |
---|
4565 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4566 | $this->assertTrue(false); |
---|
4567 | return; |
---|
4568 | } |
---|
4569 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->description); |
---|
4570 | } |
---|
4571 | |
---|
4572 | function test_item_xhtml_body_script_map_content_1 () { |
---|
4573 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_script_map_content.xml'); |
---|
4574 | try { |
---|
4575 | $feed = new XML_Feed_Parser($content); |
---|
4576 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4577 | $this->assertTrue(false); |
---|
4578 | return; |
---|
4579 | } |
---|
4580 | $this->assertEquals('safe description', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
4581 | } |
---|
4582 | |
---|
4583 | function test_item_xhtml_body_style_1 () { |
---|
4584 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/sanitize/item_xhtml_body_style.xml'); |
---|
4585 | try { |
---|
4586 | $feed = new XML_Feed_Parser($content); |
---|
4587 | } catch (XML_Feed_Parser_Exception $e) { |
---|
4588 | $this->assertTrue(false); |
---|
4589 | return; |
---|
4590 | } |
---|
4591 | $this->assertEquals('<a href="http://www.ragingplatypus.com/">never trust your upstream platypus</a>', $feed->getEntryByOffset(0)->description); |
---|
4592 | } |
---|
4593 | } |
---|
4594 | |
---|
4595 | $suite = new PHPUnit_TestSuite('sanitize_TestCase'); |
---|
4596 | $result = PHPUnit::run($suite, '123'); |
---|
4597 | echo $result->toString(); |
---|
4598 | |
---|
4599 | ?> |
---|