From: Jan Schneider Date: Fri, 15 Oct 2010 12:10:24 +0000 (+0200) Subject: Don't attach hash if there isn't any anchor. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0aac4cc99cfea30faffea8533ecbf1b9830a2dd6;p=horde.git Don't attach hash if there isn't any anchor. --- diff --git a/wicked/lib/Text_Wiki/Render/Xhtml/Wikilink2.php b/wicked/lib/Text_Wiki/Render/Xhtml/Wikilink2.php index 4a2ad7d93..e959dc78c 100644 --- a/wicked/lib/Text_Wiki/Render/Xhtml/Wikilink2.php +++ b/wicked/lib/Text_Wiki/Render/Xhtml/Wikilink2.php @@ -47,7 +47,10 @@ class Text_Wiki_Render_Xhtml_Wikilink2 extends Text_Wiki_Render_Xhtml_Wikilink { } } - $anchor = '#' . $this->urlEncode(substr($anchor, 1)); + $anchor = $this->urlEncode(substr($anchor, 1)); + if (strlen($anchor)) { + $anchor = '#' . $anchor; + } // Does the page exist? if ($exists) {