summaryrefslogtreecommitdiffstats
path: root/php-htmlawed.spec
blob: c7514c0a4fceef11822bb51876d0abe1bc871a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
%global libname htmLawed

Name:           php-%{libname}
Version:        1.1.11
Release:        1%{?dist}
Summary:        PHP code to purify & filter HTML
Group:          Development/Libraries
License:        LGPLv3+ and GPLv2+
URL:            http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/

# Latest archive is not versionned
# No license included
# see http://www.bioinformatics.org/phplabware/forum/viewtopic.php?id=220
Source0:        http://www.bioinformatics.org/phplabware/downloads/%{libname}.zip

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

Requires:       php-ctype
Requires:       php-pcre


%description
PHP code to purify & filter HTML

* make HTML markup in text secure and standard-compliant
* process text for use in HTML, XHTML or XML documents
* restrict HTML elements, attributes or URL protocols 
  using black or white-lists
* balance tags, check element nesting, transform deprecated 
  attributes and tags, make relative URLs absolute, etc.
* fast, highly customizable, well-documented
* single, 48 kb file
* simple HTML Tidy alternative
* free and licensed under LGPL v3 and GPL v2+
* use to filter, secure & sanitize HTML in blog comments or 
  forum posts, generate XML-compatible feed items from web-page 
  excerpts, convert HTML to XHTML, pretty-print HTML, scrape
  web-pages, reduce spam, remove XSS code, etc.


%prep
%setup -qc

chmod -x htm*


%build
# nothing to build


%install
rm -rf %{buildroot}
install -d %{buildroot}%{_datadir}/php/%{libname}
install -pm 0644 htmLawed.php %{buildroot}%{_datadir}/php/%{libname}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc *README* *TESTCASE* htmLawedTest.php
%{_datadir}/php/%{libname}


%changelog
* Fri Jun 29 2012 Remi Collet <remi@fedoraproject.org> - 1.1.11-1
- initial package