AUBBC
view release on metacpan or search on metacpan
warn 'ENTER html_escape' if $DEBUG_AUBBC;
$text = '' unless defined $text;
if ($text) {
$text =~ s/(&|;)/$1 eq '&' ? '&' : ';'/ge;
if (!$option) {
$text =~ s/\t/ \ \ \ /g;
$text =~ s/ / \ /g;
}
$text =~ s/"/"/g;
$text =~ s/</</g;
$text =~ s/>/>/g;
$text =~ s/'/'/g;
$text =~ s/\)/)/g;
$text =~ s/\(/(/g;
$text =~ s/\\/\/g;
$text =~ s/\|/|/g;
! $option && $AUBBC{line_break} eq '2'
? $text =~ s/\n/<br$AUBBC{html_type}>/g
: $text =~ s/\n/<br$AUBBC{html_type}>\n/g if !$option && $AUBBC{line_break} eq '1';
return $text;
}
$html = '' unless defined $html;
if ($html) {
$html =~ s/&/&/g;
$html =~ s/;/;/g;
if (!$option) {
$html =~ s/ \ \ \ /\t/g;
$html =~ s/ \ / /g;
}
$html =~ s/"/"/g;
$html =~ s/</</g;
$html =~ s/>/>/g;
$html =~ s/'/'/g;
$html =~ s/)/\)/g;
$html =~ s/(/\(/g;
$html =~ s/\/\\/g;
$html =~ s/|/\|/g;
$html =~ s/<br(?:\s?\/)?>\n?/\n/g if $AUBBC{line_break};
return $html;
}
}
examples/tag_list.cgi view on Meta::CPAN
? $aubbc->aubbc_error()
: $aubbc->do_all_ubbc($message);
print "Content-type: text/html\n\n";
print <<HTML;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>AUBBC.pm Tag List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<script type="text/javascript" src="?js_print">
</script>
<style type="text/css">
.codepost {
background-color: #ffffff;
width: 80%;
height: auto;
white-space: nowrap;
( run in 0.874 second using v1.01-cache-2.11-cpan-e1769b4cff6 )