<html><head><title>Test mit eval und convert_html()</title>
<script language="JavaScript">
function _show(x)
{
document.getElementById("out").innerHTML=x;
}
</script>
</head>
<body>


<perl>
$var="Sonderzeichen wie  ä ö ü Ä | < > Ö Ü ß % § \$ # ! ?";
####################################################
####### es folgt ein hash für die eval-Auswertung ##
%hash=(
1 =>
'
outl "<h2>1.$var</h2>";
',

2 =>
'
outl "<h2>2.$var sind ausverkauft</h2>";
'
);
###################################################
out<<EOF;

<input size=1 style="font-size:12px" type=button value="1. Satz" onclick=show('satz=1')>
<input size=1 style="font-size:12px" type=button value="2. Satz" onclick=show('satz=2')>
Sonderzeichen wie <b>ä ö ü</b> bei eval.

<div id="out"></div>

Zur Kontrolle - folgende Sätze sollten jeweils angezeigt werden : <a href="/cgi-bin/baseportal.pl?show=$htx" target=_BLANK>siehe Code</a><hr>

EOF
################# Kontrolle ausgeben - convert_html nicht notwendig
$Text=$hash{1};
eval $Text;
$Text=$hash{2};
eval $Text;
out "<hr>";
##################
</perl>

<perl script=show>
##################
$Text=$hash{$satz};
$Text=convert_html($Text) if($satz eq "2");
outl "<font color=red>convert_html() ist dabei, aber keine Anzeige</font>" if($satz eq "2");
$Text=~ s/&lt;/</g; 
$Text=~ s/&gt;/>/g;
eval $Text;
###################
</perl>

</body></html>