HTML-Detoxifier

 view release on metacpan or  search on metacpan

lib/HTML/Detoxifier.pm  view on Meta::CPAN

		h4 => undef,
		h5 => undef,
		h6 => undef,
		i => undef,
		kbd => undef,
		marquee => undef,
		pre => undef,
		s => undef,
		small => undef,
		strike => undef,
		strong => undef,
		style => undef,
		'sub' => undef,
		sup => undef,
		tt => undef,
		u => undef,
		var => undef
	},
	'size-changing' => {
		big => undef,
		h1 => undef,
		h2 => undef,
		h3 => undef,
		h4 => undef,
		h5 => undef,
		h6 => undef,
		small => undef,
		style => undef,
		'sub' => undef,
		sup => undef
	},
	block => {
		blockquote => undef,
		br => undef,
		code => undef,
		div => undef,
		dl => undef,
		h1 => undef,
		h2 => undef,
		h3 => undef,
		h4 => undef,
		h5 => undef,
		h6 => undef,
		hr => undef,
		li => undef,
		marquee => undef,
		ol => undef,
		p => undef,
		pre => undef,
		q => undef,
		samp => undef,
		style => undef,
		ul => undef
	},
	forms => {
		button => undef,
		fieldset => undef,
		form => undef,
		input => undef,
		label => undef,
		legend => undef,
		optgroup => undef,
		option => undef,
		select => undef,
		textarea => undef
	},
	layout => {
		caption => undef,
		col => undef,
		colgroup => undef,
		style => undef,
		table => undef,
		tbody => undef,
		td => undef,
		tfoot => undef,
		th => undef,
		thead => undef,
		tr => undef
	},
	images => {
		img => undef,
		map => undef,
		style => undef
	},
	annoying => {
		marquee => undef,
		blink => undef
	},
	dynamic => {
		applet => undef,
		embed => undef,
		noscript => undef,
		object => undef,
		param => undef,
		script => undef
	},
	misc => {
		abbr => undef,
		cite => undef,
		dd => undef,
		del => undef,
		dfn => undef,
		dt => undef,
		span => undef
	}
};

=head1 HTML TAG GROUPS

The following groups can be disallowed or allowed as you choose. Some tags are
present in more than one group. In these cases, the tag must be present in
I<every> allowed group, or the tag will be removed.

=head2 everything

All HTML.

=head2 document

Markup that defines the basic structure of a document (e.g. html, head, body).

lib/HTML/Detoxifier.pm  view on Meta::CPAN


=head2 dynamic

Markup that specifies JavaScript or some other embedded format (SVG, Flash,
Java, etc.) Possibly dangerous.

=head2 misc

Usually seldom-used, typically-harmless HTML tags that specify special types
of inline text. (e.g. abbr, dd, span). 

=cut

use constant TAGS => {
	a => undef,
	abbr => undef,
	acronym => undef,
	address => undef,
	applet => undef,
	area => undef,
	b => undef,
	base => undef,
	basefont => undef,
	bdo => undef,
	big => undef,
	blink => undef,
	blockquote => undef,
	body => undef,
	br => undef,
	button => undef,
	caption => undef,
	cite => undef,
	code => undef,
	col => undef,
	colgroup => undef,
	dd => undef,
	del => undef,
	dfn => undef,
	div => undef,
	dl => undef,
	dt => undef,
	em => undef,
	embed => undef,
	fieldset => undef,
	form => undef,
	h1 => undef,
	h2 => undef,
	h3 => undef,
	h4 => undef,
	h5 => undef,
	h6 => undef,
	head => undef,
	hr => undef,
	html => undef,
	i => undef,
	img => undef,
	input => undef,
	ins => undef,
	kbd => undef,
	label => undef,
	legend => undef,
	li => undef,
	link => undef,
	map => undef,
	marquee => undef,
	meta => undef,
	noscript => undef,
	object => undef,
	ol => undef,
	optgroup => undef,
	option => undef,
	p => undef,
	param => undef,
	pre => undef,
	q => undef,
	s => undef,
	samp => undef,
	script => undef,
	select => undef,
	small => undef,
	span => undef,
	strike => undef,
	strong => undef,
	style => undef,
	'sub' => undef,
	sup => undef,
	table => undef,
	tbody => undef,
	td => undef,
	textarea => undef,
	tfoot => undef,
	th => undef,
	thead => undef,
	title => undef,
	tr => undef,
	tt => undef,
	u => undef,
	ul => undef,
	var => undef
};

use constant EMPTY_ELEMENTS => {
	area => undef,
	base => undef,
	basefont => undef,
	br => undef,
	col => undef,
	frame => undef,
	hr => undef,
	img => undef,
	input => undef,
	isindex => undef,
	link => undef,
	meta => undef,
	param => undef
};

use constant STYLES_ALLOWED_IF => {
	aesthetic => undef,
	block => undef,
	layout => undef,



( run in 0.948 second using v1.01-cache-2.11-cpan-39bf76dae61 )