Skip to content
Permalink
Browse files

[plugin:gsearch] fix link url problem

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 63c8d1288a5cad815f3bb6a5cbd2e637718d8013
Showing with 5 additions and 5 deletions.
  1. +5 −5 xoops_trust_path/modules/xpwiki/plugin/gsearch.inc.php
@@ -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>";
}
@@ -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> ]";
@@ -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;

0 comments on commit 63c8d12

Please sign in to comment.
You can’t perform that action at this time.