Skip to content

Commit

Permalink
[plugin:gsearch] fix link url problem
Browse files Browse the repository at this point in the history
URL に  "%" が含まれるなどの場合に正しくリンクされない問題の修正。

ref. http://xoops.hypweb.net/modules/forum/index.php?post_id=13424
  • Loading branch information
nao-pon committed Nov 25, 2013
1 parent 7ea2aa8 commit 63c8d12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xoops_trust_path/modules/xpwiki/plugin/gsearch.inc.php
Expand Up @@ -217,10 +217,10 @@ function plugin_gsearch_build_web($res,$target,$col)
mb_convert_variables($this->cont['SOURCE_ENCODING'],"UTF-8",$dats);
foreach ($dats as $dat)
{
if ($this->plugin_gsearch_check_ngsite($dat['url'])) {continue;}
if ($this->plugin_gsearch_check_ngsite($dat['unescapedUrl'])) {continue;}
if ($cnt++ % $limit === 0 && $cnt !== 1) $html .= "</ul></div>".$sdiv."<ul>";
$html .= "<li>";
$html .= "<a href='".$dat['url']."' target='{$target}'>".$dat['titleNoFormatting']."</a>";
$html .= "<a href='".$this->func->htmlspecialchars($dat['unescapedUrl'])."' target='{$target}'>".$dat['titleNoFormatting']."</a>";
$html .= "<div class='quotation'>".$this->func->make_link(strip_tags($dat['content']))."</div>";
$html .= "</li>";
}
Expand Down Expand Up @@ -250,7 +250,7 @@ function plugin_gsearch_build_images($res,$target,$col)
mb_convert_variables($this->cont['SOURCE_ENCODING'],"UTF-8",$dats);
foreach ($dats as $dat)
{
if ($this->plugin_gsearch_check_ngsite($dat['url'])) {continue;}
if ($this->plugin_gsearch_check_ngsite($dat['unescapedUrl'])) {continue;}
$title = "[".$dat['titleNoFormatting']."]".$this->func->htmlspecialchars($dat['contentNoFormatting']);
$size = $dat['width']." x ".$dat['height'];
$site = "[ <a href=\"".$this->func->htmlspecialchars($dat['originalContextUrl'])."\" target='{$target}'>Site</a> ]";
Expand Down Expand Up @@ -287,9 +287,9 @@ function plugin_gsearch_build_video($res,$target,$col)
mb_convert_variables($this->cont['SOURCE_ENCODING'],"UTF-8",$dats);
foreach ($dats as $dat)
{
if ($this->plugin_gsearch_check_ngsite($dat['url'])) {continue;}
if ($this->plugin_gsearch_check_ngsite($dat['unescapedUrl'])) {continue;}
$title = "[".$dat['titleNoFormatting']."]".$this->func->htmlspecialchars($dat['contentNoFormatting']);
$site = " [ <a href=\"".$this->func->htmlspecialchars($dat['url'])."\" target='{$target}'>Site</a> ]";
$site = " [ <a href=\"".$this->func->htmlspecialchars($dat['unescapedUrl'])."\" target='{$target}'>Site</a> ]";
$min = (int)($dat['duration'] / 60);
$sec = sprintf("%02d",($dat['duration'] % 60));
$length = $min.":".$sec;
Expand Down

0 comments on commit 63c8d12

Please sign in to comment.