3 %bcond_without tests # do not perform "make test"
6 %define pnam StripScripts
7 Summary: HTML::StripScripts - Strip scripting constructs out of HTML
8 Summary(pl.UTF-8): HTML::StripScripts - wyciągnij konstrukcje skryptowe poza HTML
9 Name: perl-HTML-StripScripts
12 License: GPL v1+ or Artistic
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/HTML/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: e8c51fbfda69efaf94c2937084d2458f
16 Patch0: HTML-StripScripts-1.05-Fix-typo-in-regex.patch
17 URL: http://search.cpan.org/dist/HTML-StripScripts/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 This module strips scripting constructs out of HTML, leaving as much
27 non-scripting markup in place as possible. This allows web
28 applications to display HTML originating from an untrusted source
29 without introducing XSS (cross site scripting) vulnerabilities.
31 You will probably use HTML::StripScripts::Parser rather than using
34 The process is based on whitelists of tags, attributes and attribute
35 values. This approach is the most secure against disguised scripting
36 constructs hidden in malicious HTML documents.
38 As well as removing scripting constructs, this module ensures that
39 there is a matching end for each start tag, and that the tags are
42 Previously, in order to customise the output, you needed to subclass
43 HTML::StripScripts and override methods. Now, most customisation can
44 be done through the Rules option provided to new(). (See
45 examples/declaration/ and examples/tags/ for cases where subclassing
48 %description -l pl.UTF-8
49 Moduł ten wyciąga konstrukcje skryptowe poza HTML zastępując je
50 znacznikami nieskryptowymi w każdym możliwym miejscu. Dzięki temu
51 aplikacje webowe mogą wyświetlać HTML pochodzący z niezaufanego źródła
52 bez wprowadzania wrażliwości XSS (cross site scripting).
55 %setup -q -n %{pdir}-%{pnam}-%{version}
59 %{__perl} Makefile.PL \
63 %{?with_tests:%{__make} test}
66 rm -rf $RPM_BUILD_ROOT
68 %{__make} pure_install \
69 DESTDIR=$RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
80 %{perl_vendorlib}/HTML/*.pm
82 %{_examplesdir}/%{name}-%{version}