Changeset 1625
- Timestamp:
- 08/29/06 17:45:05
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/hackathon-summary/plagger/t/plugins/Filter-HTMLScrubber/base.t
r1622 r1625 4 4 test_plugin_deps; 5 5 plan 'no_plan'; 6 run_eval_expected ;6 run_eval_expected_with_capture; 7 7 8 8 __END__ … … 11 11 --- input config 12 12 plugins: 13 - module: CustomFeed::Debug14 config:15 title: foo16 link: 'http://www.example.net/'17 entry:18 - title: bar19 link: 'http://www.example.net/1'20 body: |21 <script type="text/javascript">22 function pla() {23 alert("Plagger is a pluggable aggregator");24 }25 </script>26 <p>27 <a href="#" onclick="pla()">Plagger is a pluggable aggregator</a>28 </p>29 13 - module: Filter::HTMLScrubber 30 14 --- expected 31 15 ok 1, $block->name; 32 unlike $context->update->feeds->[0]->entries->[0]->body, qr!</?script .*?>!sm;33 16 17 === Simple test 18 --- input config 19 plugins: 20 - module: CustomFeed::Debug 21 config: 22 title: Foo Bar 23 entry: 24 - title: Nasty 25 body: Foo <style>bar</style> 26 - module: Filter::HTMLScrubber 27 --- expected 28 unlike $context->update->feeds->[0]->entries->[0]->body, qr!<style>bar</style>! 29 30 === Don't scrub non-HTML 31 --- input config 32 global: 33 log: 34 level: debug 35 plugins: 36 - module: CustomFeed::Debug 37 config: 38 title: Foo Bar 39 entry: 40 - title: Nasty 41 body: This is not HTML. 42 - module: Filter::HTMLScrubber 43 --- expected 44 unlike $warning, qr/Scrubbing/; 45 46
