Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Badger::Codec::HTML(3)User Contributed Perl DocumentatioBadger::Codec::HTML(3)

NAME
       Badger::Codec::HTML - encode and	decode reserved	characters in HTML

SYNOPSIS
	   use Badger::Codec::HTML;

	   # class methods
	   my $enc = Badger::Codec::HTML->encode("http://foo.com/bar.html");
	   my $dec = $codec->decode($enc);

	   # object methods
	   my $codec = Badger::Codec::HTML->new();
	   my $enc   = $codec->encode("http://foo.com/bar.html");
	   my $dec   = $codec->decode($enc);

DESCRIPTION
       This module implements a	subclass of Badger::Codec for encoding and
       decoding	HTML.  It is based on code extracted from Lincoln Stein's
       CGI.pm module.

       The encode() method encodes HTML	by converting any reserved characters
       to the correct HTML entities.

       The decode() method reverses this process.

METHODS
   encode($html, $charset)
       Encodes the HTML	text passed as the first argument.

	   $encoded = Badger::Codec::HTML->encode($html);

       The optional second argument can	be used	to indicate the	character set
       in use.	If this	is set to "ISO-8859-1" "WINDOWS-1252" then the encoded
       data will undergo some additional processing in order to	work around
       some known bugs in Microsoft's web browsers.  See fix_windows().

   decode($html)
       Decodes the encoded HTML	text passed as the first argument.

	   $html = Badger::Codec::HTML->decode($encoded);

   fix_windows($text)
       This method is used internally to repair	the damage caused by bugs in
       certain inferior	browsers.

AUTHOR
       Andy Wardley <http://wardley.org/>

COPYRIGHT
       Copyright (C) 2005-2009 Andy Wardley. All rights	reserved.

ACKNOWLEDGEMENTS
       This code is derived from Lincoln D. Stein's CGI	module.

SEE ALSO
       Badger::Codec

perl v5.32.0			  2016-12-12		Badger::Codec::HTML(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | AUTHOR | COPYRIGHT | ACKNOWLEDGEMENTS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Badger::Codec::HTML&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help