From 283b374f6a015d13bc063286845e10915113ae3d Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Sat, 22 Mar 2008 10:53:55 +0000 Subject: [PATCH] Fixed bug#44492 (Searching produces an error message) --- results.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/results.php b/results.php index f0a37f42f..4f509ae90 100644 --- a/results.php +++ b/results.php @@ -118,7 +118,7 @@ foreach($res['ResultSet']['Result'] as $i => $hit) { if($type=='pecl' && strstr($displayurl,"/bugs/")) $type = "peclbugs"; if($type=='pear' && strstr($displayurl,"/bugs/")) $type = "pearbugs"; if($type=='smarty') continue; - $display_title = str_replace('PHP:', '', $hit['Title']); + $display_title = str_replace(array('PHP:', '&'), array('', '&'), $hit['Title']); $types = array('pear'=>'', 'pecl'=>'', 'pecl4win'=>'', @@ -134,9 +134,8 @@ foreach($res['ResultSet']['Result'] as $i => $hit) { 'doc'=>'', 'bugs'=>'' ); - // These strings are apparently double escaped - $summary = html_entity_decode($hit['Summary'], ENT_NOQUOTES, "UTF-8"); - $display_title = html_entity_decode($display_title, ENT_NOQUOTES, "UTF-8"); + // Fix &gt; double escaping + $summary = str_replace('&', '&', $hit['Summary']); echo <<

{$types[$type]}{$display_title}