From f103954b6b8a2af7b0891e23e01a86c2b0cff7e5 Mon Sep 17 00:00:00 2001 From: Riccardo Di Dato Date: Fri, 28 Jul 2017 17:16:57 +0200 Subject: [PATCH] Inizio correzione titoli mal-tagliati in index Signed-off-by: Riccardo Di Dato --- public/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/index.php b/public/index.php index 4e08f95..55f2a44 100644 --- a/public/index.php +++ b/public/index.php @@ -173,9 +173,9 @@ catch (Exception $ex){
titolo) > 103) ? substr($ansa->titolo,0,100).'...' : $ansa->titolo; - $stringSottotitolo = (strlen($ansa->sottotitolo) > 73) ? substr($ansa->sottotitolo,0,70).'...' : $ansa->sottotitolo; - $stringTesto = (strlen($ansa->testo) > 33) ? substr($ansa->testo,0,30).'...' : $ansa->testo;?> + $stringTitolo = (strlen($ansa->titolo) > 103) ? htmlentities( substr( html_entity_decode( $ansa->titolo ) ,0,100) ).'...' : $ansa->titolo; + $stringSottotitolo = (strlen($ansa->sottotitolo) > 73) ? htmlentities( substr( html_entity_decode( $ansa->sottotitolo ) ,0,70) ).'...' : $ansa->sottotitolo; + $stringTesto = (strlen($ansa->testo) > 33) ? htmlentities( substr( html_entity_decode( $ansa->testo ),0,30) ).'...' : $ansa->testo;?>
@@ -207,8 +207,8 @@ catch (Exception $ex){ $i=0; foreach ($politicaNews as $politica){ $i++; - $stringTitolo = (strlen($politica->titolo) > 53) ? substr($politica->titolo,0,50).'...' : $politica->titolo; - $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?> + $stringTitolo = (strlen($politica->titolo) > 53) ? htmlentities( substr( html_entity_decode( $politica->titolo ) ,0,50) ).'...' : $politica->titolo; + $string = (strlen($politica->sottotitolo) > 33) ? htmlentities( substr( html_entity_decode( $politica->sottotitolo ),0,30) ).'...' : $politica->sottotitolo;?>