| 1 | package Catalyst::Plugin::StripScripts; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use HTML::StripScripts::Parser; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.1'; | |||||||||
| 8 | |||||||||||
| 9 | 0 | ▶ | sub strip_scripts { | ||||||||
|
Subroutine
strip_scripts: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 10 | 0 | my $c = shift; | |||||||||
| 11 | 0 | my $html = shift; | |||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | return if !$html; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | |||||||||||
| 15 | 0 | my $config = $c->config->{strip_scripts}; | |||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | return if !ref($config) eq 'ARRAY'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | my $hss = HTML::StripScripts::Parser->new(@$config); | |||||||||
| 20 | |||||||||||
| 21 | 0 | return $hss->filter_html($html); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | 1; | |||||||||
| 25 | |||||||||||
| 26 | __END__ | ||||||||||