package WebGUI::HTML; =head1 LEGAL ------------------------------------------------------------------- WebGUI is Copyright 2001-2009 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using this software. ------------------------------------------------------------------- http://www.plainblack.com info@plainblack.com ------------------------------------------------------------------- =cut use HTML::TokeParser; use HTML::TagFilter; use strict; use WebGUI::Macro; use HTML::Parser; use HTML::Entities; =head1 NAME Package WebGUI::HTML =head1 DESCRIPTION A package for manipulating and massaging HTML. =head1 SYNOPSIS use WebGUI::HTML; $html = WebGUI::HTML::cleanSegment($html); $html = WebGUI::HTML::filter($html); $html = WebGUI::HTML::format($content, $contentType); $html = WebGUI::HTML::html2text($html); $html = WebGUI::HTML::makeAbsolute($session, $html); $html = WebGUI::HTML::processReplacements($session, $html); $html = WebGUI::HTML::splitTag([$tag,]$html[,$count]); # defaults to ( 'p', $html, 1 ) $html = WebGUI::HTML::arrayToRow(@columnData); =head1 METHODS These methods are available from this package: =cut #------------------------------------------------------------------- =head2 arrayToRow ( @columnData ) Wraps each element of @columnData in a table cell tag, concatenates them all together, and then wraps that in table row tags. =head3 @columnData An array of strings to wrap. =cut sub arrayToRow { my @columnData = @_; my $output = '