package TTXPreview;
#
# This module is a part of Trouble Ticket Express package
# http://www.troubleticketexpress.com
#
# COPYRIGHT: 2006, United Web Coders
# http://www.unitedwebcoders.com
#
# $Revision: 224 $
# $Date: 2006-07-24 11:32:24 -0400 (Mon, 24 Jul 2006) $
#

$TTXPreview::VERSION='2.22';
BEGIN {
  $TTXPreview::REVISION = '$Revision: 224 $';
  if ($TTXPreview::REVISION =~ /(\d+)/) {
    $TTXPreview::REVISION = $1;
  }
};
use strict;
use TTXCommon;
require TTXMarkup;

# ======================================================================== print
sub preview {
  my ($cfg, $query, $data) = @_;
  $data->{PAGEHEADING} = '[%Message Preview%]';
  my $body = TTXCommon::cleanit($query, 'msg');
  $body =~ s/</&lt;/g;
  $body = TTXMarkup::html($body);
  $body =~ s/\n/<br>\n/g;
  $data->{MESSAGE} = $body;
  return undef;
}
1;
#
