use strict;
return 1;
=head1 Name

OSSTag - A Social Tagging Engine

Copyright (c) 2006 Open Source Development Labs, Inc.

=cut

=head2 preventHTMLInjection

	Replaces "<" with corresponding HTML-Code "&lt;" and ">" with "&gt;"

=cut

package osstag_helper;

sub preventHTMLInjection($)
{
	my ($text) = @_;
	$text =~ s/\</\&lt;/g;
	$text =~ s/\>/\&gt;/g;
	return $text;
}

=head2 getSQLDateNow

	Returns the current date and time as String in the way SQL wants it

=cut

sub getSQLDateNow()
{
	my $self = shift;
	my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
	my $sqld = ($year+1900).'-'.($mon+1).'-'.$mday.' '.$hour.':'.$min.':'.$sec;
	return $sqld;
}

=head1 License

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License 
version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

=head1 Version

Version: 0.2

Date:    07-JUN-2006

=head1 Author

Author:  Jan Kechel (jan@kechel.de)

=cut 

