cvs: phpweb / results.php

From: Date: Sat, 22 Mar 2008 10:53:55 +0000
Subject: cvs: phpweb / results.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-1386@lists.php.net to get a copy of this message
bjori Sat Mar 22 10:53:55 2008 UTC Modified files: /phpweb results.php Log: Fixed bug#44492 (Searching produces an error message) http://cvs.php.net/viewvc.cgi/phpweb/results.php?r1=1.39&r2=1.40&diff_format=u Index: phpweb/results.php diff -u phpweb/results.php:1.39 phpweb/results.php:1.40 --- phpweb/results.php:1.39 Wed Mar 19 16:17:18 2008 +++ phpweb/results.php Sat Mar 22 10:53:55 2008 @@ -1,5 +1,5 @@ <?php -// $Id: results.php,v 1.39 2008/03/19 16:17:18 bjori Exp $ +// $Id: results.php,v 1.40 2008/03/22 10:53:55 bjori Exp $ $_SERVER['BASE_PAGE'] = 'results.php'; include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; #include $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc'; @@ -118,7 +118,7 @@ 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:', '&amp;'), array('', '&'), $hit['Title']); $types = array('pear'=>'<img src="http://static.php.net/www.php.net/images/pear_item.gif" height="19" width="17" style="float:left; margin-left:-30px;"/>', 'pecl'=>'<img src="http://static.php.net/www.php.net/images/pecl_item.gif" height="19" width="17" style="float:left; margin-left:-30px;"/>', 'pecl4win'=>'<img src="http://static.php.net/www.php.net/images/pecl_item_win.gif" height="22" width="21" style="float:left; margin-left:-31px;"/>', @@ -134,9 +134,8 @@ 'doc'=>'<img src="http://static.php.net/www.php.net/images/logos/php-icon-white.gif" height="32" width="32" style="float:left; margin-left:-40px;"/>', 'bugs'=>'<img src="http://static.php.net/www.php.net/images/php_bug.gif" height="32" width="32" style="float:left; margin-left:-40px;"/>' ); - // 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 &amp;gt; double escaping + $summary = str_replace('&amp;', '&', $hit['Summary']); echo <<<EOB <li> <p class="result">{$types[$type]}<a href="{$real_url}">{$display_title}</a></p>

« previous php.webmaster (#1386) next »