diff --git a/modules/doc/library/Doc/Renderer/DocSearchRenderer.php b/modules/doc/library/Doc/Renderer/DocSearchRenderer.php
index aa5a9f892..31445dfc8 100644
--- a/modules/doc/library/Doc/Renderer/DocSearchRenderer.php
+++ b/modules/doc/library/Doc/Renderer/DocSearchRenderer.php
@@ -107,11 +107,30 @@ class DocSearchRenderer extends DocRenderer
);
/** @type \Icinga\Web\Url $url */
$url->setAnchor($this->encodeAnchor($section->getId()));
- $this->content[] = sprintf(
- '
%s',
- $section->getNoFollow() ? 'rel="nofollow" ' : '',
+ $urlAttributes = array(
+ 'data-base-target' => '_next',
+ 'title' => sprintf(
+ $this->getView()->translate(
+ 'Show all matches of "%s" in %sthe chapter "%s"',
+ 'search.render.section.link'
+ ),
+ $this->getInnerIterator()->getSearch()->getInput(),
+ $section->getId() !== $section->getChapter()->getId() ? sprintf(
+ $this->getView()->translate('the section "%s" of ', 'search.render.section.link'),
+ $section->getTitle()
+ ) : '',
+ $section->getChapter()->getTitle()
+ )
+ );
+ if ($section->getNoFollow()) {
+ $urlAttributes['rel'] = 'nofollow';
+ }
+ $this->content[] = '' . $this->getView()->qlink(
+ $title,
$url->getAbsoluteUrl(),
- $title
+ null,
+ $urlAttributes,
+ false
);
if (! empty($contentMatches)) {
$this->content = array_merge($this->content, $contentMatches);
diff --git a/modules/doc/library/Doc/Renderer/DocTocRenderer.php b/modules/doc/library/Doc/Renderer/DocTocRenderer.php
index ed65a1e0b..a216a190b 100644
--- a/modules/doc/library/Doc/Renderer/DocTocRenderer.php
+++ b/modules/doc/library/Doc/Renderer/DocTocRenderer.php
@@ -87,11 +87,25 @@ class DocTocRenderer extends DocRenderer
$url = $view->url($path);
/** @type \Icinga\Web\Url $url */
$url->setAnchor($this->encodeAnchor($section->getId()));
- $this->content[] = sprintf(
- '%s',
- $section->getNoFollow() ? 'rel="nofollow" ' : '',
+ $urlAttributes = array(
+ 'data-base-target' => '_next',
+ 'title' => sprintf(
+ $this->getView()->translate('Show the %schapter "%s"', 'toc.render.section.link'),
+ $section->getId() !== $section->getChapter()->getId() ? sprintf(
+ $this->getView()->translate('section "%s" of the ', 'toc.render.section.link'),
+ $section->getTitle()
+ ) : '',
+ $section->getChapter()->getTitle()
+ )
+ );
+ if ($section->getNoFollow()) {
+ $urlAttributes['rel'] = 'nofollow';
+ }
+ $this->content[] = '' . $this->getView()->qlink(
+ $section->getTitle(),
$url->getAbsoluteUrl(),
- $view->escape($section->getTitle())
+ null,
+ $urlAttributes
);
if (! $section->hasChildren()) {
$this->content[] = '';