legato al problema < e > ho questo.
IL mio problema è che sul titolo mi visualizza un testo come: "<prova>"
in questa pagina prendo i dati da un db:
codice:
while($results = mysql_fetch_array($query_limit)) {
$gg = addslashes($results["gg"]);
$mm = addslashes($results["mm"]);
$aa = addslashes($results["aa"]);
$titolo = addslashes($results["titolo"]);
$testo = addslashes($results["testo"]);
$titolo = strtr($titolo, '\"', "\'");
$testo = strtr($testo, '\"', "\'");
$titolo = strtr($titolo, '-', "<");
//$results["titolo"] = str_replace("<", "<", $titolo);
//$results["titolo"] = str_replace(">", ">", $titolo);
//htmlspecialchars($titolo);
//htmlspecialchars($testo);
print "<tr>";
print "<td width='90' height='30' valign='center' class='ultime_h_data'>".$results["gg"]."-".$results["mm"]."-".$results["aa"].": </td>
<td width='380' height='30' valign='center' class='ultime_h_det'>
<a href=\"#javascript:;\" onClick=\"passa('".$gg."', '".$mm."', '".$aa."', '".$titolo."', '".$testo."');\" class='ultime_h'>".$results["titolo"]."</A></td>";
print "</tr>";
}
print "</table>";
Nel popup fa casini e non si vede <prova>.
dove sbaglio?
ecoo il js:
codice:
<script Language="Javascript"><!--
function passa(gg, mm, aa, titolo, testo){
win = window.open('','pop','width=420, height=500, scrollbars=yes');
win.document.write("<html><head><style type='text/css'> @import 'stile.css';</style><title>LE INIZIATIVE DELLA SEZIONE PORTO FLUVIALE</title></head><body bgcolor='#ffffff' topmargin='0' leftmargin='0'><table width='400' height='498' border='0' cellpadding='0' cellspacing='0' rules='all' frame='border' class='news_tot'><tr><td valign='top'><table width='400' height='70' border='0' cellpadding='0' cellspacing='4' rules='all' frame='border' class='news_up'><tr><td></td></tr></table><table width='400' height='380' border='0' cellpadding='0' cellspacing='4' rules='all' frame='border' class='news'><tr><td HEIGHT='30' valign='center' class='news_data'>Data: " + gg + "-" + mm + "-" + aa + " </td></tr><tr><td HEIGHT='30' valign='center'>" + titolo + "</td></tr><tr><td HEIGHT='290' valign='top'>" + testo + "</td></tr></table><table width='400' height='20' border='0' cellpadding='0' cellspacing='4' rules='all' frame='border' class='news_footer'><tr><td width='290'>sezione_portofluviale@email.it</td><td width='110'>[img]image/logomini.gif[/img]</td></tr></table></td></tr></table></body></html>");
}
--></script>
grazie!