From fb3a2d1c705a5bbc400f0c0a877b0e7d14eb9b84 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Sun, 2 Oct 2011 17:14:09 +0000 Subject: [PATCH] Sanitize is a whitelist-based HTML sanitizer. Given a list of acceptable elements and attributes, Sanitize will remove all unacceptable HTML from a string. Using a simple configuration syntax, you can tell Sanitize to allow certain elements, certain attributes within those elements, and even certain URL protocols within attributes that contain URLs. Any HTML elements or attributes that you don't explicitly allow will be removed. Author: Ryan Grove WWW: https://github.com/rgrove/sanitize/ WWW: http://wonko.com/post/sanitize PR: ports/158312 Submitted by: Eric Freeman --- textproc/Makefile | 1 + textproc/rubygem-sanitize/Makefile | 22 ++++++++++++++++++++++ textproc/rubygem-sanitize/distinfo | 2 ++ textproc/rubygem-sanitize/pkg-descr | 13 +++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 textproc/rubygem-sanitize/Makefile create mode 100644 textproc/rubygem-sanitize/distinfo create mode 100644 textproc/rubygem-sanitize/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index 42332aa77fca..e7a3501b40d8 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1221,6 +1221,7 @@ SUBDIR += rubygem-rak SUBDIR += rubygem-rchardet SUBDIR += rubygem-rdiscount + SUBDIR += rubygem-sanitize SUBDIR += rubygem-sass SUBDIR += rubygem-sax-machine SUBDIR += rubygem-spreadsheet diff --git a/textproc/rubygem-sanitize/Makefile b/textproc/rubygem-sanitize/Makefile new file mode 100644 index 000000000000..f00b583621f1 --- /dev/null +++ b/textproc/rubygem-sanitize/Makefile @@ -0,0 +1,22 @@ +# Ports collection makefile for: rubygem-sanitize +# Date created: 26 June 2011 +# Whom: Eric Freeman +# +# $FreeBSD$ +# + +PORTNAME= sanitize +PORTVERSION= 2.0.2 +CATEGORIES= textproc rubygems +MASTER_SITES= RG + +MAINTAINER= freebsdports@chillibear.com +COMMENT= Whitelist based HTML sanitizer + +RUN_DEPENDS= rubygem-nokogiri>=1.4.4:${PORTSDIR}/textproc/rubygem-nokogiri + +USE_RUBY= yes +USE_RUBYGEMS= yes +RUBYGEM_AUTOPLIST= yes + +.include diff --git a/textproc/rubygem-sanitize/distinfo b/textproc/rubygem-sanitize/distinfo new file mode 100644 index 000000000000..18e109bb35b3 --- /dev/null +++ b/textproc/rubygem-sanitize/distinfo @@ -0,0 +1,2 @@ +SHA256 (rubygem/sanitize-2.0.2.gem) = f805fe593ca3c2650401c509c120ae9135dc88b353c0ec15b828743d218df205 +SIZE (rubygem/sanitize-2.0.2.gem) = 14336 diff --git a/textproc/rubygem-sanitize/pkg-descr b/textproc/rubygem-sanitize/pkg-descr new file mode 100644 index 000000000000..35ab28e2529f --- /dev/null +++ b/textproc/rubygem-sanitize/pkg-descr @@ -0,0 +1,13 @@ +Sanitize is a whitelist-based HTML sanitizer. Given a list of +acceptable elements and attributes, Sanitize will remove all +unacceptable HTML from a string. + +Using a simple configuration syntax, you can tell Sanitize to +allow certain elements, certain attributes within those elements, +and even certain URL protocols within attributes that contain URLs. +Any HTML elements or attributes that you don't explicitly allow +will be removed. + +Author: Ryan Grove +WWW: https://github.com/rgrove/sanitize/ +WWW: http://wonko.com/post/sanitize