Skip to content

Commit 6a85e7b

Browse files
authored
getTagLinkUrlで取得するタグの名称をurlエンコード fix #4045
1 parent b867cb1 commit 6a85e7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/bc-blog/src/View/Helper/BlogHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,11 +1541,11 @@ public function getTagLinkUrl($blogContentId, $tag, $base = true)
15411541
$sitesService = $this->getService(SitesServiceInterface::class);
15421542
$site = $sitesService->findByUrl($this->currentContent->url);
15431543
$url = $this->BcBaser->getContentsUrl($this->currentContent->url, !$this->isSameSiteBlogContent($blogContentId), !empty($site->useSubDomain), false);
1544-
$url = $url . 'archives/tag/' . $tag->name;
1544+
$url = $url . 'archives/tag/' . rawurlencode($tag->name);
15451545
}
15461546
}
15471547
if (!$url) {
1548-
$url = '/tags/' . $tag->name;
1548+
$url = '/tags/' . rawurlencode($tag->name);
15491549
$sites = TableRegistry::getTableLocator()->get('BaserCore.Sites');
15501550
$site = $sites->findByUrl($this->_View->getRequest()->getPath());
15511551
if ($site && $site->alias && !$site->useSubDomain) {

0 commit comments

Comments
 (0)